@ -50,7 +50,7 @@ class ServicesPage extends StatelessWidget {
late MedicalFileViewModel medicalFileViewModel ;
late final List < HmgServicesComponentModel > hmgServices = [
HmgServicesComponentModel ( 11 , " Emergency Services " . needTranslation , " " . needTranslation , AppAssets . emergency_services_icon , bgColor: AppColors . primaryRedColor , true , route: null , onTap: ( ) async {
HmgServicesComponentModel ( 11 , LocaleKeys . emergencyServices . tr ( ) , " " , AppAssets . emergency_services_icon , bgColor: AppColors . primaryRedColor , true , route: null , onTap: ( ) async {
if ( getIt . get < AppState > ( ) . isAuthenticated ) {
getIt . get < EmergencyServicesViewModel > ( ) . flushData ( ) ;
getIt . get < EmergencyServicesViewModel > ( ) . getTransportationOrders (
@ -71,14 +71,14 @@ class ServicesPage extends StatelessWidget {
} ) ,
HmgServicesComponentModel (
11 ,
" Book \n Appointment " . needTranslation ,
" " .needTranslation ,
LocaleKeys . bookAppointment . tr ( ) ,
" " ,
AppAssets . appointment_calendar_icon ,
bgColor: AppColors . bookAppointment ,
true ,
route: AppRoutes . bookAppointmentPage ,
) ,
HmgServicesComponentModel ( 5 , " Complete Checkup " . needTranslation , " " . needTranslation , AppAssets . comprehensiveCheckup , bgColor: AppColors . bgGreenColor , true , route: null , onTap: ( ) async {
HmgServicesComponentModel ( 5 , LocaleKeys . completeCheckup . tr ( ) , " " , AppAssets . comprehensiveCheckup , bgColor: AppColors . bgGreenColor , true , route: null , onTap: ( ) async {
if ( getIt . get < AppState > ( ) . isAuthenticated ) {
getIt . get < NavigationService > ( ) . pushPageRoute ( AppRoutes . comprehensiveCheckupPage ) ;
} else {
@ -87,8 +87,8 @@ class ServicesPage extends StatelessWidget {
} ) ,
HmgServicesComponentModel (
11 ,
" Indoor Navigation " . needTranslation ,
" " .needTranslation ,
LocaleKeys . indoorNavigation . tr ( ) ,
" " ,
AppAssets . indoor_nav_icon ,
bgColor: Color ( 0xff45A2F8 ) ,
true ,
@ -131,7 +131,7 @@ class ServicesPage extends StatelessWidget {
} ,
) ,
HmgServicesComponentModel (
11 , " E-Referral Services " . needTranslation , " " . needTranslation , 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 ) {
getIt . get < NavigationService > ( ) . pushPageRoute ( AppRoutes . eReferralPage ) ;
} else {
@ -140,13 +140,13 @@ class ServicesPage extends StatelessWidget {
} ) ,
HmgServicesComponentModel (
3 ,
" Blood Donation " . needTranslation ,
" " .needTranslation ,
LocaleKeys . bloodDonation . tr ( ) ,
" " ,
AppAssets . blood_donation_icon ,
bgColor: AppColors . bloodDonationCardColor ,
true ,
route: null , onTap: ( ) async {
LoaderBottomSheet . showLoader ( loadingText: " Fetching Data... " ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . pleaseWait . tr ( ) ) ;
await bloodDonationViewModel . getRegionSelectedClinics ( onSuccess: ( val ) async {
/ / await bloodDonationViewModel . getPatientBloodGroupDetails ( onSuccess: ( val ) {
LoaderBottomSheet . hideLoader ( ) ;
@ -210,8 +210,8 @@ class ServicesPage extends StatelessWidget {
late final List < HmgServicesComponentModel > hmgHealthToolServices = [
HmgServicesComponentModel (
11 ,
" Health Trackers " . needTranslation ,
" " .needTranslation ,
LocaleKeys . healthTrackers . tr ( ) ,
" " ,
AppAssets . general_health ,
bgColor: AppColors . whiteColor ,
true ,
@ -226,15 +226,15 @@ class ServicesPage extends StatelessWidget {
) ,
HmgServicesComponentModel (
11 ,
" Daily Water Monitor " . needTranslation ,
" " .needTranslation ,
LocaleKeys . dailyWaterMonitor . tr ( ) ,
" " ,
AppAssets . daily_water_monitor_icon ,
bgColor: AppColors . whiteColor ,
true ,
route: null , / / Set to null since we handle navigation in onTap
onTap: ( ) async {
if ( getIt . get < AppState > ( ) . isAuthenticated ) {
LoaderBottomSheet . showLoader ( loadingText: " Fetching your water intake details. " . needTranslation ) ;
LoaderBottomSheet . showLoader ( loadingText: LocaleKeys . fetchingYourWaterIntakeDetails . tr ( ) ) ;
final waterMonitorVM = getIt . get < WaterMonitorViewModel > ( ) ;
final context = getIt . get < NavigationService > ( ) . navigatorKey . currentContext ! ;
await waterMonitorVM . fetchUserDetailsForMonitoring (
@ -259,8 +259,8 @@ class ServicesPage extends StatelessWidget {
) ,
HmgServicesComponentModel (
11 ,
" Health \n Calculators " . needTranslation ,
" " .needTranslation ,
LocaleKeys . healthCalculatorsServices . tr ( ) ,
" " ,
AppAssets . health_calculators_services_icon ,
bgColor: AppColors . whiteColor ,
true ,
@ -268,8 +268,8 @@ class ServicesPage extends StatelessWidget {
) ,
HmgServicesComponentModel (
5 ,
" Health \n Converters " . needTranslation ,
" " .needTranslation ,
LocaleKeys . healthConvertersServices . tr ( ) ,
" " ,
AppAssets . health_converters_icon ,
bgColor: AppColors . whiteColor ,
true ,
@ -277,8 +277,8 @@ class ServicesPage extends StatelessWidget {
) ,
HmgServicesComponentModel (
11 ,
" Smart \n Watches " . needTranslation ,
" " .needTranslation ,
LocaleKeys . smartWatchesServices . tr ( ) ,
" " ,
AppAssets . smartwatch_icon ,
bgColor: AppColors . whiteColor ,
true ,
@ -301,13 +301,13 @@ class ServicesPage extends StatelessWidget {
return Scaffold (
backgroundColor: AppColors . bgScaffoldColor ,
body: CollapsingListView (
title: " Explore Services " . needTranslation ,
title: LocaleKeys . exploreServices . tr ( ) ,
isLeading: false ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
SizedBox ( height: 16. h ) ,
" Medical & Care Services " . needTranslation . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
LocaleKeys . medicalAndCareServices . tr ( ) . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
SizedBox ( height: 16. h ) ,
GridView . builder (
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount (
@ -325,7 +325,7 @@ class ServicesPage extends StatelessWidget {
} ,
) . paddingSymmetrical ( 24. w , 0 ) ,
SizedBox ( height: 24. h ) ,
" HMG Services " . needTranslation . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
LocaleKeys . hmgServices . tr ( ) . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
SizedBox ( height: 16. h ) ,
SizedBox (
height: 350. h ,
@ -356,7 +356,7 @@ class ServicesPage extends StatelessWidget {
) ,
) ,
SizedBox ( height: 24. h ) ,
" Personal Services " . needTranslation . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
LocaleKeys . personalServices . tr ( ) . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
SizedBox ( height: 16. h ) ,
Row (
children: [
@ -377,7 +377,7 @@ class ServicesPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment . center ,
children: [
Utils . buildSvgWithAssets ( icon: AppAssets . wallet , width: 30. w , height: 30. h ) ,
" Habib Wallet " . needTranslation . toText14 ( weight: FontWeight . w600 , maxlines: 2 ) . expanded ,
LocaleKeys . habibWallet . tr ( ) . toText14 ( weight: FontWeight . w600 , maxlines: 2 ) . expanded ,
Utils . buildSvgWithAssets ( icon: AppAssets . arrow_forward ) ,
] ,
) ,
@ -387,7 +387,7 @@ class ServicesPage extends StatelessWidget {
return Utils . getPaymentAmountWithSymbol2 ( habibWalletVM . habibWalletAmount , isExpanded: false )
. toShimmer2 ( isShow: habibWalletVM . isWalletAmountLoading , radius: 12. r , width: 80. w , height: 24. h ) ;
} )
: " Login to view your wallet balance " . needTranslation . toText12 ( fontWeight: FontWeight . w500 , maxLine: 2 ) ,
: LocaleKeys . loginToViewWalletBalance . tr ( ) . toText12 ( fontWeight: FontWeight . w500 , maxLine: 2 ) ,
Spacer ( ) ,
getIt . get < AppState > ( ) . isAuthenticated
? CustomButton (
@ -396,7 +396,7 @@ class ServicesPage extends StatelessWidget {
iconSize: 16. w ,
iconColor: AppColors . infoColor ,
textColor: AppColors . infoColor ,
text: " Recharge " . needTranslation ,
text: LocaleKeys . recharge . tr ( ) ,
borderWidth: 0. w ,
fontWeight: FontWeight . w500 ,
borderColor: Colors . transparent ,
@ -472,7 +472,7 @@ class ServicesPage extends StatelessWidget {
) ,
] ,
)
: " Login to view your medical file " . needTranslation . toText12 ( fontWeight: FontWeight . w500 , maxLine: 2 ) ,
: LocaleKeys . loginToViewMedicalFile . tr ( ) . toText12 ( fontWeight: FontWeight . w500 , maxLine: 2 ) ,
Spacer ( ) ,
getIt . get < AppState > ( ) . isAuthenticated
? CustomButton (
@ -481,7 +481,7 @@ class ServicesPage extends StatelessWidget {
iconSize: 16. w ,
iconColor: AppColors . primaryRedColor ,
textColor: AppColors . primaryRedColor ,
text: " Add Member " . needTranslation ,
text: LocaleKeys . addMember . tr ( ) ,
borderWidth: 0. w ,
fontWeight: FontWeight . w500 ,
borderColor: Colors . transparent ,
@ -492,8 +492,8 @@ class ServicesPage extends StatelessWidget {
DialogService dialogService = getIt . get < DialogService > ( ) ;
medicalFileViewModel . clearAuthValues ( ) ;
dialogService . showAddFamilyFileSheet (
label: " Add Family Member " . needTranslation ,
message: " Please fill the below field to add a new family member to your profile " . needTranslation ,
label: LocaleKeys . addFamilyMember . tr ( ) ,
message: LocaleKeys . pleaseFillBelowFieldToAddNewFamilyMember . tr ( ) ,
onVerificationPress: ( ) {
medicalFileViewModel . addFamilyFile ( otpTypeEnum: OTPTypeEnum . sms ) ;
} ) ;
@ -517,7 +517,7 @@ class ServicesPage extends StatelessWidget {
] ,
) . paddingSymmetrical ( 24. w , 0 ) ,
SizedBox ( height: 24. h ) ,
" Health Tools " . needTranslation . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
LocaleKeys . healthTools . tr ( ) . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
SizedBox ( height: 16. h ) ,
GridView . builder (
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount (
@ -540,7 +540,7 @@ class ServicesPage extends StatelessWidget {
} ,
) . paddingSymmetrical ( 24. w , 0 ) ,
SizedBox ( height: 24. h ) ,
" Support Services " . needTranslation . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
LocaleKeys . supportServices . tr ( ) . toText18 ( isBold: true ) . paddingSymmetrical ( 24. w , 0 ) ,
SizedBox ( height: 16. h ) ,
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
@ -565,7 +565,7 @@ class ServicesPage extends StatelessWidget {
fit: BoxFit . contain ,
) ,
SizedBox ( width: 8. w ) ,
" Virtual Tour " . needTranslation . toText12 ( fontWeight: FontWeight . w500 )
LocaleKeys . virtualTour . tr ( ) . toText12 ( fontWeight: FontWeight . w500 )
] ,
) ,
) ,
@ -594,7 +594,7 @@ class ServicesPage extends StatelessWidget {
fit: BoxFit . contain ,
) ,
SizedBox ( width: 8. w ) ,
" Car Parking " . needTranslation . toText12 ( fontWeight: FontWeight . w500 )
LocaleKeys . carParking . tr ( ) . toText12 ( fontWeight: FontWeight . w500 )
] ,
) . onPress ( ( ) {
Navigator . push (
@ -633,7 +633,7 @@ class ServicesPage extends StatelessWidget {
fit: BoxFit . contain ,
) ,
SizedBox ( width: 8. w ) ,
" Latest News " . needTranslation . toText12 ( fontWeight: FontWeight . w500 )
LocaleKeys . latestNews . tr ( ) . toText12 ( fontWeight: FontWeight . w500 )
] ,
) ,
) ,
@ -662,7 +662,7 @@ class ServicesPage extends StatelessWidget {
fit: BoxFit . contain ,
) ,
SizedBox ( width: 8. w ) ,
" HMG Contact " . needTranslation . toText12 ( fontWeight: FontWeight . w500 )
LocaleKeys . hmgContact . tr ( ) . toText12 ( fontWeight: FontWeight . w500 )
] ,
) ,
) ,