|  |  |  | @ -3,6 +3,7 @@ import 'dart:async'; | 
		
	
		
			
				|  |  |  |  | import 'package:easy_localization/easy_localization.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:flutter/material.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:flutter_swiper_view/flutter_swiper_view.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:get_it/get_it.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/core/app_assets.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/core/app_state.dart'; | 
		
	
	
		
			
				
					|  |  |  | @ -18,6 +19,7 @@ import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_mode | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_page.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/presentation/authentication/quick_login.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointment_page.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:hmg_patient_app_new/presentation/home/data/landing_page_data.dart'; | 
		
	
	
		
			
				
					|  |  |  | @ -54,6 +56,8 @@ class _LandingPageState extends State<LandingPage> { | 
		
	
		
			
				|  |  |  |  |   late PrescriptionsViewModel prescriptionsViewModel; | 
		
	
		
			
				|  |  |  |  |   final CacheService cacheService = GetIt.instance<CacheService>(); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   final SwiperController _controller = SwiperController(); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   @override | 
		
	
		
			
				|  |  |  |  |   void initState() { | 
		
	
		
			
				|  |  |  |  |     authVM = context.read<AuthenticationViewModel>(); | 
		
	
	
		
			
				
					|  |  |  | @ -93,7 +97,6 @@ class _LandingPageState extends State<LandingPage> { | 
		
	
		
			
				|  |  |  |  |               child: Row( | 
		
	
		
			
				|  |  |  |  |                 mainAxisAlignment: MainAxisAlignment.spaceBetween, | 
		
	
		
			
				|  |  |  |  |                 children: [ | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |                   appState.isAuthenticated | 
		
	
		
			
				|  |  |  |  |                       ? WelcomeWidget( | 
		
	
		
			
				|  |  |  |  |                           onTap: () { | 
		
	
	
		
			
				
					|  |  |  | @ -104,9 +107,7 @@ class _LandingPageState extends State<LandingPage> { | 
		
	
		
			
				|  |  |  |  |                             ); | 
		
	
		
			
				|  |  |  |  |                           }, | 
		
	
		
			
				|  |  |  |  |                           name: ('${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}'), | 
		
	
		
			
				|  |  |  |  |                     imageUrl: appState | 
		
	
		
			
				|  |  |  |  |                         .getAuthenticatedUser() | 
		
	
		
			
				|  |  |  |  |                         ?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, | 
		
	
		
			
				|  |  |  |  |                           imageUrl: appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, | 
		
	
		
			
				|  |  |  |  |                         ) | 
		
	
		
			
				|  |  |  |  |                       : CustomButton( | 
		
	
		
			
				|  |  |  |  |                           text: LocaleKeys.loginOrRegister.tr(context: context), | 
		
	
	
		
			
				
					|  |  |  | @ -157,45 +158,83 @@ class _LandingPageState extends State<LandingPage> { | 
		
	
		
			
				|  |  |  |  |             appState.isAuthenticated | 
		
	
		
			
				|  |  |  |  |                 ? Column( | 
		
	
		
			
				|  |  |  |  |                     children: [ | 
		
	
		
			
				|  |  |  |  |                 Container( | 
		
	
		
			
				|  |  |  |  |                   width: double.infinity, | 
		
	
		
			
				|  |  |  |  |                   decoration: RoundedRectangleBorder().toSmoothCornerDecoration( | 
		
	
		
			
				|  |  |  |  |                     color: AppColors.whiteColor, | 
		
	
		
			
				|  |  |  |  |                     borderRadius: 24, | 
		
	
		
			
				|  |  |  |  |                   ), | 
		
	
		
			
				|  |  |  |  |                   child: Padding( | 
		
	
		
			
				|  |  |  |  |                     padding: EdgeInsets.all(12.h), | 
		
	
		
			
				|  |  |  |  |                     child: Column( | 
		
	
		
			
				|  |  |  |  |                       children: [ | 
		
	
		
			
				|  |  |  |  |                         Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h), | 
		
	
		
			
				|  |  |  |  |                         SizedBox(height: 12.h), | 
		
	
		
			
				|  |  |  |  |                         "You do not have any upcoming appointment. Please book an appointment".toText12(isCenter: true), | 
		
	
		
			
				|  |  |  |  |                       SizedBox(height: 12.h), | 
		
	
		
			
				|  |  |  |  |                         CustomButton( | 
		
	
		
			
				|  |  |  |  |                           text: LocaleKeys.bookAppo.tr(context: context), | 
		
	
		
			
				|  |  |  |  |                           onPressed: () { | 
		
	
		
			
				|  |  |  |  |                             Navigator.of(context) | 
		
	
		
			
				|  |  |  |  |                                 .push( | 
		
	
		
			
				|  |  |  |  |                       Row( | 
		
	
		
			
				|  |  |  |  |                         mainAxisAlignment: MainAxisAlignment.spaceBetween, | 
		
	
		
			
				|  |  |  |  |                         children: [ | 
		
	
		
			
				|  |  |  |  |                           "Appointments & Visits".toText16(isBold: true), | 
		
	
		
			
				|  |  |  |  |                           Row( | 
		
	
		
			
				|  |  |  |  |                             children: [ | 
		
	
		
			
				|  |  |  |  |                               LocaleKeys.viewAll.tr(context: context).toText12(color: AppColors.primaryRedColor), | 
		
	
		
			
				|  |  |  |  |                               SizedBox(width: 2.h), | 
		
	
		
			
				|  |  |  |  |                               Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h), | 
		
	
		
			
				|  |  |  |  |                             ], | 
		
	
		
			
				|  |  |  |  |                           ), | 
		
	
		
			
				|  |  |  |  |                         ], | 
		
	
		
			
				|  |  |  |  |                       ).paddingSymmetrical(24.h, 0.h).onPress(() { | 
		
	
		
			
				|  |  |  |  |                         Navigator.of(context).push( | 
		
	
		
			
				|  |  |  |  |                           FadePage( | 
		
	
		
			
				|  |  |  |  |                                 page: BookAppointmentPage(), | 
		
	
		
			
				|  |  |  |  |                             page: MyAppointmentsPage(), | 
		
	
		
			
				|  |  |  |  |                           ), | 
		
	
		
			
				|  |  |  |  |                         ); | 
		
	
		
			
				|  |  |  |  |                       }), | 
		
	
		
			
				|  |  |  |  |                       SizedBox(height: 12.h), | 
		
	
		
			
				|  |  |  |  |                       Swiper( | 
		
	
		
			
				|  |  |  |  |                         itemCount: 3, | 
		
	
		
			
				|  |  |  |  |                         layout: SwiperLayout.STACK, | 
		
	
		
			
				|  |  |  |  |                         loop: true, | 
		
	
		
			
				|  |  |  |  |                         itemWidth: MediaQuery.of(context).size.width - 42, | 
		
	
		
			
				|  |  |  |  |                         indicatorLayout: PageIndicatorLayout.COLOR, | 
		
	
		
			
				|  |  |  |  |                         axisDirection: AxisDirection.right, | 
		
	
		
			
				|  |  |  |  |                         controller: _controller, | 
		
	
		
			
				|  |  |  |  |                         itemHeight: 210 + 16, | 
		
	
		
			
				|  |  |  |  |                         pagination: const SwiperPagination( | 
		
	
		
			
				|  |  |  |  |                           alignment: Alignment.bottomCenter, | 
		
	
		
			
				|  |  |  |  |                           margin: EdgeInsets.only(top: 210 + 8 + 24), | 
		
	
		
			
				|  |  |  |  |                           builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: AppColors.blackBgColor), | 
		
	
		
			
				|  |  |  |  |                         ), | 
		
	
		
			
				|  |  |  |  |                         itemBuilder: (BuildContext context, int index) { | 
		
	
		
			
				|  |  |  |  |                           return FamilyCardWidget().paddingOnly(right: 16); | 
		
	
		
			
				|  |  |  |  |                         }, | 
		
	
		
			
				|  |  |  |  |                           backgroundColor: Color(0xffFEE9EA), | 
		
	
		
			
				|  |  |  |  |                           borderColor: Color(0xffFEE9EA), | 
		
	
		
			
				|  |  |  |  |                           textColor: Color(0xffED1C2B), | 
		
	
		
			
				|  |  |  |  |                           fontSize: 14, | 
		
	
		
			
				|  |  |  |  |                           fontWeight: FontWeight.w500, | 
		
	
		
			
				|  |  |  |  |                           borderRadius: 12, | 
		
	
		
			
				|  |  |  |  |                           padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | 
		
	
		
			
				|  |  |  |  |                           height: 40, | 
		
	
		
			
				|  |  |  |  |                           icon: AppAssets.add_icon, | 
		
	
		
			
				|  |  |  |  |                           iconColor: AppColors.primaryRedColor, | 
		
	
		
			
				|  |  |  |  |                       ), | 
		
	
		
			
				|  |  |  |  |                       ], | 
		
	
		
			
				|  |  |  |  |                     ), | 
		
	
		
			
				|  |  |  |  |                   ), | 
		
	
		
			
				|  |  |  |  |                 ).paddingSymmetrical(24.h, 0.h), | 
		
	
		
			
				|  |  |  |  |                       // Container( | 
		
	
		
			
				|  |  |  |  |                       //   width: double.infinity, | 
		
	
		
			
				|  |  |  |  |                       //   decoration: RoundedRectangleBorder().toSmoothCornerDecoration( | 
		
	
		
			
				|  |  |  |  |                       //     color: AppColors.whiteColor, | 
		
	
		
			
				|  |  |  |  |                       //     borderRadius: 24, | 
		
	
		
			
				|  |  |  |  |                       //   ), | 
		
	
		
			
				|  |  |  |  |                       //   child: Padding( | 
		
	
		
			
				|  |  |  |  |                       //     padding: EdgeInsets.all(12.h), | 
		
	
		
			
				|  |  |  |  |                       //     child: Column( | 
		
	
		
			
				|  |  |  |  |                       //       children: [ | 
		
	
		
			
				|  |  |  |  |                       //         Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h), | 
		
	
		
			
				|  |  |  |  |                       //         SizedBox(height: 12.h), | 
		
	
		
			
				|  |  |  |  |                       //         "You do not have any upcoming appointment. Please book an appointment".toText12(isCenter: true), | 
		
	
		
			
				|  |  |  |  |                       //         SizedBox(height: 12.h), | 
		
	
		
			
				|  |  |  |  |                       //         CustomButton( | 
		
	
		
			
				|  |  |  |  |                       //           text: LocaleKeys.bookAppo.tr(context: context), | 
		
	
		
			
				|  |  |  |  |                       //           onPressed: () { | 
		
	
		
			
				|  |  |  |  |                       //             Navigator.of(context).push( | 
		
	
		
			
				|  |  |  |  |                       //               FadePage( | 
		
	
		
			
				|  |  |  |  |                       //                 page: BookAppointmentPage(), | 
		
	
		
			
				|  |  |  |  |                       //               ), | 
		
	
		
			
				|  |  |  |  |                       //             ); | 
		
	
		
			
				|  |  |  |  |                       //           }, | 
		
	
		
			
				|  |  |  |  |                       //           backgroundColor: Color(0xffFEE9EA), | 
		
	
		
			
				|  |  |  |  |                       //           borderColor: Color(0xffFEE9EA), | 
		
	
		
			
				|  |  |  |  |                       //           textColor: Color(0xffED1C2B), | 
		
	
		
			
				|  |  |  |  |                       //           fontSize: 14, | 
		
	
		
			
				|  |  |  |  |                       //           fontWeight: FontWeight.w500, | 
		
	
		
			
				|  |  |  |  |                       //           borderRadius: 12, | 
		
	
		
			
				|  |  |  |  |                       //           padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | 
		
	
		
			
				|  |  |  |  |                       //           height: 40, | 
		
	
		
			
				|  |  |  |  |                       //           icon: AppAssets.add_icon, | 
		
	
		
			
				|  |  |  |  |                       //           iconColor: AppColors.primaryRedColor, | 
		
	
		
			
				|  |  |  |  |                       //         ), | 
		
	
		
			
				|  |  |  |  |                       //       ], | 
		
	
		
			
				|  |  |  |  |                       //     ), | 
		
	
		
			
				|  |  |  |  |                       //   ), | 
		
	
		
			
				|  |  |  |  |                       // ).paddingSymmetrical(24.h, 0.h), | 
		
	
		
			
				|  |  |  |  |                       SizedBox(height: 12.h), | 
		
	
		
			
				|  |  |  |  |                       Row( | 
		
	
		
			
				|  |  |  |  |                         mainAxisAlignment: MainAxisAlignment.spaceBetween, | 
		
	
	
		
			
				
					|  |  |  | @ -375,7 +414,7 @@ class _LandingPageState extends State<LandingPage> { | 
		
	
		
			
				|  |  |  |  |             // sharedPref.setBool(HAS_ENABLED_QUICK_LOGIN, true); | 
		
	
		
			
				|  |  |  |  |             authVM.loginWithFingerPrintFace(() { | 
		
	
		
			
				|  |  |  |  |               isDone = true; | 
		
	
		
			
				|  |  |  |  |               cacheService.saveBool(key: CacheConst.quickLoginEnabled,value: true); | 
		
	
		
			
				|  |  |  |  |               cacheService.saveBool(key: CacheConst.quickLoginEnabled, value: true); | 
		
	
		
			
				|  |  |  |  |               setState(() {}); | 
		
	
		
			
				|  |  |  |  |             }); | 
		
	
		
			
				|  |  |  |  |           }, | 
		
	
	
		
			
				
					|  |  |  | 
 |