|
|
|
@ -53,14 +53,7 @@ class ServicesPage extends StatelessWidget {
|
|
|
|
late MedicalFileViewModel medicalFileViewModel;
|
|
|
|
late MedicalFileViewModel medicalFileViewModel;
|
|
|
|
|
|
|
|
|
|
|
|
late final List<HmgServicesComponentModel> hmgServices = [
|
|
|
|
late final List<HmgServicesComponentModel> hmgServices = [
|
|
|
|
HmgServicesComponentModel(
|
|
|
|
HmgServicesComponentModel(11, LocaleKeys.emergencyServices.tr(), "", AppAssets.emergency_services_icon, bgColor: AppColors.primaryRedColor, true, route: null, onTap: () async {
|
|
|
|
11,
|
|
|
|
|
|
|
|
LocaleKeys.emergencyServices.tr(),
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
AppAssets.emergency_services_icon,
|
|
|
|
|
|
|
|
bgColor: AppColors.primaryRedColor,
|
|
|
|
|
|
|
|
true,
|
|
|
|
|
|
|
|
route: null, onTap: () async {
|
|
|
|
|
|
|
|
if (getIt.get<AppState>().isAuthenticated) {
|
|
|
|
if (getIt.get<AppState>().isAuthenticated) {
|
|
|
|
getIt.get<EmergencyServicesViewModel>().flushData();
|
|
|
|
getIt.get<EmergencyServicesViewModel>().flushData();
|
|
|
|
getIt.get<EmergencyServicesViewModel>().getTransportationOrders(
|
|
|
|
getIt.get<EmergencyServicesViewModel>().getTransportationOrders(
|
|
|
|
@ -88,8 +81,7 @@ class ServicesPage extends StatelessWidget {
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
route: AppRoutes.bookAppointmentPage,
|
|
|
|
route: AppRoutes.bookAppointmentPage,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HmgServicesComponentModel(
|
|
|
|
HmgServicesComponentModel(5, LocaleKeys.completeCheckup.tr(), "", AppAssets.comprehensiveCheckup, bgColor: AppColors.bgGreenColor, true, route: null, onTap: () async {
|
|
|
|
5, LocaleKeys.completeCheckup.tr(), "", AppAssets.comprehensiveCheckup, bgColor: AppColors.bgGreenColor, true, route: null, onTap: () async {
|
|
|
|
|
|
|
|
if (getIt.get<AppState>().isAuthenticated) {
|
|
|
|
if (getIt.get<AppState>().isAuthenticated) {
|
|
|
|
getIt.get<NavigationService>().pushPageRoute(AppRoutes.comprehensiveCheckupPage);
|
|
|
|
getIt.get<NavigationService>().pushPageRoute(AppRoutes.comprehensiveCheckupPage);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -141,8 +133,7 @@ class ServicesPage extends StatelessWidget {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HmgServicesComponentModel(
|
|
|
|
HmgServicesComponentModel(11, LocaleKeys.eReferralServices.tr(), "", AppAssets.eReferral, bgColor: AppColors.eReferralCardColor, true, route: null, onTap: () async {
|
|
|
|
11, LocaleKeys.eReferralServices.tr(), "", AppAssets.eReferral, bgColor: AppColors.eReferralCardColor, true, route: null, onTap: () async {
|
|
|
|
|
|
|
|
if (getIt.get<AppState>().isAuthenticated) {
|
|
|
|
if (getIt.get<AppState>().isAuthenticated) {
|
|
|
|
getIt.get<NavigationService>().pushPageRoute(AppRoutes.eReferralPage);
|
|
|
|
getIt.get<NavigationService>().pushPageRoute(AppRoutes.eReferralPage);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -415,19 +406,19 @@ class ServicesPage extends StatelessWidget {
|
|
|
|
? CustomButton(
|
|
|
|
? CustomButton(
|
|
|
|
height: 40.h,
|
|
|
|
height: 40.h,
|
|
|
|
icon: AppAssets.recharge_icon,
|
|
|
|
icon: AppAssets.recharge_icon,
|
|
|
|
iconSize: 24.w,
|
|
|
|
iconSize: 24.w,
|
|
|
|
iconColor: AppColors.infoColor,
|
|
|
|
iconColor: AppColors.infoColor,
|
|
|
|
textColor: AppColors.infoColor,
|
|
|
|
textColor: AppColors.infoColor,
|
|
|
|
text: LocaleKeys.recharge.tr(),
|
|
|
|
text: LocaleKeys.recharge.tr(),
|
|
|
|
borderWidth: 0.w,
|
|
|
|
borderWidth: 0.w,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
borderColor: Colors.transparent,
|
|
|
|
borderColor: Colors.transparent,
|
|
|
|
backgroundColor: Color(0xff45A2F8).withValues(alpha: 0.08),
|
|
|
|
backgroundColor: Color(0xff45A2F8).withValues(alpha: 0.08),
|
|
|
|
padding: EdgeInsets.all(8.w),
|
|
|
|
padding: EdgeInsets.all(8.w),
|
|
|
|
fontSize: 14.f,
|
|
|
|
fontSize: 14.f,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: RechargeWalletPage()));
|
|
|
|
Navigator.of(context).push(CustomPageRoute(page: RechargeWalletPage()));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: SizedBox.shrink(),
|
|
|
|
: SizedBox.shrink(),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -467,60 +458,60 @@ class ServicesPage extends StatelessWidget {
|
|
|
|
getIt.get<AppState>().isAuthenticated
|
|
|
|
getIt.get<AppState>().isAuthenticated
|
|
|
|
? Wrap(
|
|
|
|
? Wrap(
|
|
|
|
spacing: -12.h,
|
|
|
|
spacing: -12.h,
|
|
|
|
// runSpacing: 0.h,
|
|
|
|
// runSpacing: 0.h,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Utils.buildImgWithAssets(
|
|
|
|
Utils.buildImgWithAssets(
|
|
|
|
icon: AppAssets.babyGirlImg,
|
|
|
|
icon: AppAssets.babyGirlImg,
|
|
|
|
height: 32.h,
|
|
|
|
height: 32.h,
|
|
|
|
width: 32.w,
|
|
|
|
width: 32.w,
|
|
|
|
border: 1,
|
|
|
|
border: 1,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
borderRadius: 50.r,
|
|
|
|
borderRadius: 50.r,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Utils.buildImgWithAssets(
|
|
|
|
Utils.buildImgWithAssets(
|
|
|
|
icon: AppAssets.femaleImg,
|
|
|
|
icon: AppAssets.femaleImg,
|
|
|
|
height: 32.h,
|
|
|
|
height: 32.h,
|
|
|
|
width: 32.w,
|
|
|
|
width: 32.w,
|
|
|
|
border: 1,
|
|
|
|
border: 1,
|
|
|
|
borderRadius: 50.r,
|
|
|
|
borderRadius: 50.r,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Utils.buildImgWithAssets(
|
|
|
|
Utils.buildImgWithAssets(
|
|
|
|
icon: AppAssets.maleImg,
|
|
|
|
icon: AppAssets.maleImg,
|
|
|
|
height: 32.h,
|
|
|
|
height: 32.h,
|
|
|
|
width: 32.w,
|
|
|
|
width: 32.w,
|
|
|
|
border: 1,
|
|
|
|
border: 1,
|
|
|
|
borderRadius: 50.r,
|
|
|
|
borderRadius: 50.r,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: LocaleKeys.loginToViewMedicalFile.tr().toText12(fontWeight: FontWeight.w500, maxLine: 2),
|
|
|
|
: LocaleKeys.loginToViewMedicalFile.tr().toText12(fontWeight: FontWeight.w500, maxLine: 2),
|
|
|
|
Spacer(),
|
|
|
|
Spacer(),
|
|
|
|
getIt.get<AppState>().isAuthenticated
|
|
|
|
getIt.get<AppState>().isAuthenticated
|
|
|
|
? CustomButton(
|
|
|
|
? CustomButton(
|
|
|
|
height: 40.h,
|
|
|
|
height: 40.h,
|
|
|
|
icon: AppAssets.add_icon,
|
|
|
|
icon: AppAssets.add_icon,
|
|
|
|
iconSize: 24.h,
|
|
|
|
iconSize: 24.h,
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
textColor: AppColors.primaryRedColor,
|
|
|
|
textColor: AppColors.primaryRedColor,
|
|
|
|
text: LocaleKeys.addMember.tr(),
|
|
|
|
text: LocaleKeys.addMember.tr(),
|
|
|
|
borderWidth: 0.w,
|
|
|
|
borderWidth: 0.w,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
borderColor: Colors.transparent,
|
|
|
|
borderColor: Colors.transparent,
|
|
|
|
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.08),
|
|
|
|
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.08),
|
|
|
|
padding: EdgeInsets.all(8.w),
|
|
|
|
padding: EdgeInsets.all(8.w),
|
|
|
|
fontSize: 14.f,
|
|
|
|
fontSize: 14.f,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
DialogService dialogService = getIt.get<DialogService>();
|
|
|
|
DialogService dialogService = getIt.get<DialogService>();
|
|
|
|
medicalFileViewModel.clearAuthValues();
|
|
|
|
medicalFileViewModel.clearAuthValues();
|
|
|
|
dialogService.showAddFamilyFileSheet(
|
|
|
|
dialogService.showAddFamilyFileSheet(
|
|
|
|
label: LocaleKeys.addFamilyMember.tr(),
|
|
|
|
label: LocaleKeys.addFamilyMember.tr(),
|
|
|
|
message: LocaleKeys.pleaseFillBelowFieldToAddNewFamilyMember.tr(),
|
|
|
|
message: LocaleKeys.pleaseFillBelowFieldToAddNewFamilyMember.tr(),
|
|
|
|
onVerificationPress: () {
|
|
|
|
onVerificationPress: () {
|
|
|
|
medicalFileViewModel.addFamilyFile(otpTypeEnum: OTPTypeEnum.sms);
|
|
|
|
medicalFileViewModel.addFamilyFile(otpTypeEnum: OTPTypeEnum.sms);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: SizedBox.shrink(),
|
|
|
|
: SizedBox.shrink(),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -700,6 +691,58 @@ class ServicesPage extends StatelessWidget {
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
|
|
|
borderRadius: 12.h,
|
|
|
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.blackColor),
|
|
|
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
|
|
|
Expanded(child: LocaleKeys.termsConditoins.tr().toText14(weight: FontWeight.w500))
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
Utils.openWebView(
|
|
|
|
|
|
|
|
url: 'https://hmg.com/en/Pages/Terms.aspx',
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(width: 16.w),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
|
|
|
borderRadius: 12.h,
|
|
|
|
|
|
|
|
hasShadow: false,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.blackColor),
|
|
|
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
|
|
|
Expanded(child: LocaleKeys.privacyPolicy.tr().toText14(weight: FontWeight.w500))
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
Utils.openWebView(
|
|
|
|
|
|
|
|
url: 'https://hmg.com/en/Pages/Privacy.aspx',
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingSymmetrical(24.w, 0),
|
|
|
|
).paddingSymmetrical(24.w, 0),
|
|
|
|
|