|
|
|
@ -180,7 +180,29 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
body: Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
|
|
|
|
body: Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
|
|
|
|
return Stack(
|
|
|
|
return Stack(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
SingleChildScrollView(
|
|
|
|
RefreshIndicator(
|
|
|
|
|
|
|
|
color: AppColors.primaryRedColor,
|
|
|
|
|
|
|
|
onRefresh: () async {
|
|
|
|
|
|
|
|
if (appState.isAuthenticated) {
|
|
|
|
|
|
|
|
// Refresh Appointments Data
|
|
|
|
|
|
|
|
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
|
|
|
|
|
|
|
|
myAppointmentsViewModel.initAppointmentsViewModel();
|
|
|
|
|
|
|
|
myAppointmentsViewModel.getPatientAppointments(true, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Refresh Appointments Data
|
|
|
|
|
|
|
|
habibWalletVM.initHabibWalletProvider();
|
|
|
|
|
|
|
|
habibWalletVM.getPatientBalanceAmount();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Refresh Ancillary Orders
|
|
|
|
|
|
|
|
todoSectionViewModel.initializeTodoSectionViewModel();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Refresh Immediate LiveCare Data
|
|
|
|
|
|
|
|
immediateLiveCareViewModel.initImmediateLiveCare();
|
|
|
|
|
|
|
|
immediateLiveCareViewModel.getPatientLiveCareHistory();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
|
|
|
physics: const AlwaysScrollableScrollPhysics(),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: (appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
|
|
|
|
top: (appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
|
|
|
|
? (MediaQuery.paddingOf(context).top + 70.h)
|
|
|
|
? (MediaQuery.paddingOf(context).top + 70.h)
|
|
|
|
@ -215,9 +237,15 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
name: ('${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}'),
|
|
|
|
name: ('${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}'),
|
|
|
|
// imageUrl: appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.maleImg : AppAssets.femaleImg,
|
|
|
|
// imageUrl: appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.maleImg : AppAssets.femaleImg,
|
|
|
|
imageUrl: appState.getAuthenticatedUser()?.gender == 1
|
|
|
|
imageUrl: appState
|
|
|
|
? ((appState.getAuthenticatedUser()?.age ?? 0) < 7 ? AppAssets.babyBoyImg : AppAssets.maleImg)
|
|
|
|
.getAuthenticatedUser()
|
|
|
|
: ((appState.getAuthenticatedUser()?.age ?? 0) < 7 ? AppAssets.babyGirlImg : AppAssets.femaleImg),
|
|
|
|
?.gender == 1
|
|
|
|
|
|
|
|
? ((appState
|
|
|
|
|
|
|
|
.getAuthenticatedUser()
|
|
|
|
|
|
|
|
?.age ?? 0) < 7 ? AppAssets.babyBoyImg : AppAssets.maleImg)
|
|
|
|
|
|
|
|
: ((appState
|
|
|
|
|
|
|
|
.getAuthenticatedUser()
|
|
|
|
|
|
|
|
?.age ?? 0) < 7 ? AppAssets.babyGirlImg : AppAssets.femaleImg),
|
|
|
|
).expanded
|
|
|
|
).expanded
|
|
|
|
: CustomButton(
|
|
|
|
: CustomButton(
|
|
|
|
text: LocaleKeys.loginOrRegister.tr(context: context),
|
|
|
|
text: LocaleKeys.loginOrRegister.tr(context: context),
|
|
|
|
@ -279,7 +307,11 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
todoSectionVM.notificationsCount.toString(),
|
|
|
|
todoSectionVM.notificationsCount.toString(),
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white, fontFamily: "Poppins", fontSize: 10.f, fontWeight: FontWeight.w600,),
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontFamily: "Poppins",
|
|
|
|
|
|
|
|
fontSize: 10.f,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -443,7 +475,8 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// );
|
|
|
|
},
|
|
|
|
},
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => SizedBox(
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) =>
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
width: 10.w,
|
|
|
|
width: 10.w,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -589,12 +622,13 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: MedicalFilePage()));
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: MedicalFilePage()));
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
Container(
|
|
|
|
Consumer(builder: (BuildContext context, TodoSectionViewModel todoSectionVM, Widget? child) {
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
// height: 121.h,
|
|
|
|
// height: 121.h,
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
todoSectionViewModel.patientAncillaryOrdersList.isNotEmpty
|
|
|
|
todoSectionVM.patientAncillaryOrdersList.isNotEmpty
|
|
|
|
? Container(
|
|
|
|
? Container(
|
|
|
|
height: 50.h,
|
|
|
|
height: 50.h,
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
@ -607,14 +641,11 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
LocaleKeys.pendingAncillaryOrders
|
|
|
|
LocaleKeys.pendingAncillaryOrders.tr(context: context).toText14(color: AppColors.eReferralCardColor, isBold: true).paddingSymmetrical(24.h, 0.h),
|
|
|
|
.tr(context: context)
|
|
|
|
|
|
|
|
.toText14(color: AppColors.eReferralCardColor, isBold: true)
|
|
|
|
|
|
|
|
.paddingSymmetrical(24.h, 0.h),
|
|
|
|
|
|
|
|
CustomButton(
|
|
|
|
CustomButton(
|
|
|
|
text: LocaleKeys.view.tr(context: context),
|
|
|
|
text: LocaleKeys.view.tr(context: context),
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
getIt.get<TodoSectionViewModel>().setIsAncillaryOrdersNeedReloading(true);
|
|
|
|
todoSectionVM.setIsAncillaryOrdersNeedReloading(true);
|
|
|
|
Navigator.of(context).push(
|
|
|
|
Navigator.of(context).push(
|
|
|
|
CustomPageRoute(
|
|
|
|
CustomPageRoute(
|
|
|
|
page: ToDoPage(),
|
|
|
|
page: ToDoPage(),
|
|
|
|
@ -645,7 +676,11 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
trackColor: Color(0xffD9D9D9),
|
|
|
|
trackColor: Color(0xffD9D9D9),
|
|
|
|
trackBorderColor: Colors.transparent,
|
|
|
|
trackBorderColor: Colors.transparent,
|
|
|
|
trackRadius: Radius.circular(10.0),
|
|
|
|
trackRadius: Radius.circular(10.0),
|
|
|
|
padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery.sizeOf(context).width / 2.5 - 10, right: MediaQuery.sizeOf(context).width / 2.5 - 10),
|
|
|
|
padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery
|
|
|
|
|
|
|
|
.sizeOf(context)
|
|
|
|
|
|
|
|
.width / 2.5 - 10, right: MediaQuery
|
|
|
|
|
|
|
|
.sizeOf(context)
|
|
|
|
|
|
|
|
.width / 2.5 - 10),
|
|
|
|
child: ListView.separated(
|
|
|
|
child: ListView.separated(
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemCount: LandingPageData.getLoggedInServiceCardsList.length,
|
|
|
|
itemCount: LandingPageData.getLoggedInServiceCardsList.length,
|
|
|
|
@ -680,7 +715,8 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
).paddingSymmetrical(24.h, 0.h);
|
|
|
|
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
@ -698,7 +734,11 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
trackColor: Color(0xffD9D9D9),
|
|
|
|
trackColor: Color(0xffD9D9D9),
|
|
|
|
trackBorderColor: Colors.transparent,
|
|
|
|
trackBorderColor: Colors.transparent,
|
|
|
|
trackRadius: Radius.circular(10.0),
|
|
|
|
trackRadius: Radius.circular(10.0),
|
|
|
|
padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery.sizeOf(context).width / 2.5 - 10, right: MediaQuery.sizeOf(context).width / 2.5 - 10),
|
|
|
|
padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery
|
|
|
|
|
|
|
|
.sizeOf(context)
|
|
|
|
|
|
|
|
.width / 2.5 - 10, right: MediaQuery
|
|
|
|
|
|
|
|
.sizeOf(context)
|
|
|
|
|
|
|
|
.width / 2.5 - 10),
|
|
|
|
child: ListView.separated(
|
|
|
|
child: ListView.separated(
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemCount: LandingPageData.getNotLoggedInServiceCardsList.length,
|
|
|
|
itemCount: LandingPageData.getNotLoggedInServiceCardsList.length,
|
|
|
|
@ -781,6 +821,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
(appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
|
|
|
|
(appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
|
|
|
|
? Container(
|
|
|
|
? Container(
|
|
|
|
height: MediaQuery.paddingOf(context).top + 50.h,
|
|
|
|
height: MediaQuery.paddingOf(context).top + 50.h,
|
|
|
|
|