@ -2,6 +2,7 @@ import 'dart:io';
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					import  ' package:easy_localization/easy_localization.dart ' ; import  ' package:easy_localization/easy_localization.dart ' ;  
			
		
	
		
		
			
				
					
					import  ' package:flutter/material.dart ' ; import  ' package:flutter/material.dart ' ;  
			
		
	
		
		
			
				
					
					import  ' package:google_places_flutter/model/prediction.dart ' ;  
			
		
	
		
		
			
				
					
					import  ' package:hmg_patient_app_new/core/app_assets.dart ' ; import  ' package:hmg_patient_app_new/core/app_assets.dart ' ;  
			
		
	
		
		
			
				
					
					import  ' package:hmg_patient_app_new/core/app_export.dart ' ; import  ' package:hmg_patient_app_new/core/app_export.dart ' ;  
			
		
	
		
		
			
				
					
					import  ' package:hmg_patient_app_new/core/utils/utils.dart ' ; import  ' package:hmg_patient_app_new/core/utils/utils.dart ' ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -26,40 +27,38 @@ import 'package:provider/provider.dart';
 
			
		
	
		
		
			
				
					
					import  ' ../../../widgets/common_bottom_sheet.dart ' ; import  ' ../../../widgets/common_bottom_sheet.dart ' ;  
			
		
	
		
		
			
				
					
					import  ' widgets/AddressItem.dart ' ; import  ' widgets/AddressItem.dart ' ;  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					class  CallAmbulancePage  extends  StatelessWidget  { class  CallAmbulancePage  extends  StatefulWidget  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					  bool ?  isFromRRT ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					  CallAmbulancePage ( { super . key ,  this . isFromRRT  =  false } ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					  @ override 
 
			
		
	
		
		
			
				
					
					  State < CallAmbulancePage >  createState ( )  = >  _CallAmbulancePageState ( ) ; 
 
			
		
	
		
		
			
				
					
					}  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					class  _CallAmbulancePageState  extends  State < CallAmbulancePage >  {  
			
		
	
		
		
			
				
					
					  TextEditingController  addressController  =  TextEditingController ( ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					  @ override 
  @ override 
 
			
		
	
		
		
			
				
					
					  Widget  build ( BuildContext  context )  { 
  Widget  build ( BuildContext  context )  { 
 
			
		
	
		
		
			
				
					
					    return  Scaffold ( 
    return  Scaffold ( 
 
			
		
	
		
		
			
				
					
					      bottomSheet:  ExpandableBottomSheet ( 
      bottomSheet:  ExpandableBottomSheet ( 
 
			
		
	
		
		
			
				
					
					        bottomSheetType: 
        bottomSheetType:  context . watch < EmergencyServicesViewModel > ( ) . bottomSheetType , 
 
			
				
				
			
		
	
		
		
			
				
					
					            context . watch < EmergencyServicesViewModel > ( ) . bottomSheetType , 
 
			
		
	
		
		
	
		
		
			
				
					
					        children:  { 
        children:  { 
 
			
		
	
		
		
			
				
					
					          BottomSheetType . EXPANDED:  ExpanedBottomSheet ( context ) , 
          BottomSheetType . EXPANDED:  expand edBottomSheet( context ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					          BottomSheetType . FIXED:  FixedBottomSheet ( context ) , 
          BottomSheetType . FIXED:  f ixedBottomSheet( context ) , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					        } , 
        } , 
 
			
		
	
		
		
			
				
					
					      ) , 
      ) , 
 
			
		
	
		
		
			
				
					
					      body:  Stack ( 
      body:  Stack ( 
 
			
		
	
		
		
			
				
					
					        children:  [ 
        children:  [ 
 
			
		
	
		
		
			
				
					
					          if  ( context . read < EmergencyServicesViewModel > ( ) . isGMSAvailable  | | 
          if  ( context . read < EmergencyServicesViewModel > ( ) . isGMSAvailable  | |  Platform . isIOS ) 
 
			
				
				
			
		
	
		
		
			
				
					
					              Platform . isIOS ) 
            GMSMap ( currentLocation:  context . read < EmergencyServicesViewModel > ( ) . getGMSLocation ( ) ,  onCameraMoved:  ( value )  = >  context . read < EmergencyServicesViewModel > ( ) . handleGMSMapCameraMoved ( value ) ) 
 
			
				
				
			
		
	
		
		
			
				
					
					            GMSMap ( 
 
			
		
	
		
		
			
				
					
					                currentLocation: 
 
			
		
	
		
		
			
				
					
					                    context . read < EmergencyServicesViewModel > ( ) . getGMSLocation ( ) , 
 
			
		
	
		
		
			
				
					
					                onCameraMoved:  ( value )  = >  context 
 
			
		
	
		
		
			
				
					
					                    . read < EmergencyServicesViewModel > ( ) 
 
			
		
	
		
		
			
				
					
					                    . handleGMSMapCameraMoved ( value ) ) 
 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					          else 
          else 
 
			
		
	
		
		
			
				
					
					            HMSMap ( 
            HMSMap ( currentLocation:  context . read < EmergencyServicesViewModel > ( ) . getHMSLocation ( ) ,  onCameraMoved:  ( value )  = >  context . read < EmergencyServicesViewModel > ( ) . handleHMSMapCameraMoved ( value ) ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                currentLocation: 
 
			
		
	
		
		
			
				
					
					                    context . read < EmergencyServicesViewModel > ( ) . getHMSLocation ( ) , 
 
			
		
	
		
		
			
				
					
					                onCameraMoved:  ( value )  = >  context 
 
			
		
	
		
		
			
				
					
					                    . read < EmergencyServicesViewModel > ( ) 
 
			
		
	
		
		
			
				
					
					                    . handleHMSMapCameraMoved ( value ) ) , 
 
			
		
	
		
		
	
		
		
			
				
					
					          Align ( 
          Align ( 
 
			
		
	
		
		
			
				
					
					            alignment:  AlignmentDirectional . topStart , 
            alignment:  AlignmentDirectional . topStart , 
 
			
		
	
		
		
			
				
					
					            child:  Utils . buildSvgWithAssets ( 
            child:  Utils . buildSvgWithAssets ( icon:  AppAssets . closeBottomNav ,  width:  32. h ,  height:  32. h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                icon:  AppAssets . closeBottomNav ,  width:  32. h ,  height:  32. h ) , 
          ) . paddingOnly ( top:  51. h ,  left:  24. h ) . onPress ( ( )  { 
 
			
				
				
			
		
	
		
		
			
				
					
					          ) . paddingOnly ( top:  51. h ,  left:  24. h ) . onPress ( ( ) { 
 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					            Navigator . pop ( context ) ; 
            Navigator . pop ( context ) ; 
 
			
		
	
		
		
			
				
					
					          } ) 
          } ) 
 
			
		
	
		
		
			
				
					
					        ] , 
        ] , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -67,13 +66,12 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					    ) ; 
    ) ; 
 
			
		
	
		
		
			
				
					
					  } 
  } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					  Widget  F ixedBottomSheet( BuildContext  context )  { 
  Widget  f ixedBottomSheet( BuildContext  context )  { 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    return  GestureDetector ( 
    return  GestureDetector ( 
 
			
		
	
		
		
			
				
					
					      onVerticalDragUpdate:  ( details ) { 
      onVerticalDragUpdate:  ( details )   { 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        print ( " the delta is  ${ details . delta . dy } " ) ; 
        print ( " the delta is  ${ details . delta . dy } " ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        if ( details . delta . dy < 0 ) { 
        if  ( details . delta . dy  <  0 )  { 
 
			
				
				
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
	
		
		
			
				
					
					          context . read < EmergencyServicesViewModel > ( ) . updateBottomSheetState ( BottomSheetType . EXPANDED ) ; 
          context . read < EmergencyServicesViewModel > ( ) . updateBottomSheetState ( BottomSheetType . EXPANDED ) ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					      } , 
      } , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -84,15 +82,11 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					          Row ( 
          Row ( 
 
			
		
	
		
		
			
				
					
					            mainAxisAlignment:  MainAxisAlignment . end , 
            mainAxisAlignment:  MainAxisAlignment . end , 
 
			
		
	
		
		
			
				
					
					            children:  [ 
            children:  [ 
 
			
		
	
		
		
			
				
					
					               Padding ( 
              Padding ( 
 
			
				
				
			
		
	
		
		
			
				
					
					
                padding:  EdgeInsetsDirectional . only ( end:  24. h ,  bottom:  24. h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                 padding:   EdgeInsetsDirectional . only ( end: 24. h ,  bottom:  24. h ) , 
 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					                child:  DecoratedBox ( 
                child:  DecoratedBox ( 
 
			
		
	
		
		
			
				
					
					                  decoration:  RoundedRectangleBorder ( ) . toSmoothCornerDecoration ( 
                  decoration:  RoundedRectangleBorder ( ) . toSmoothCornerDecoration ( color:  AppColors . whiteColor ,  borderRadius:  12. h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                      color:  AppColors . whiteColor ,  borderRadius:  12. h ) , 
                  child:  Utils . buildSvgWithAssets ( icon:  AppAssets . locate_me ,  width:  24. h ,  height:  24. h ) . paddingAll ( 12. h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                  child:  Utils . buildSvgWithAssets ( 
 
			
		
	
		
		
			
				
					
					                      icon:  AppAssets . locate_me ,  width:  24. h ,  height:  24. h ) 
 
			
		
	
		
		
			
				
					
					                      . paddingAll ( 12. h ) , 
 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					                ) , 
                ) , 
 
			
		
	
		
		
			
				
					
					              ) , 
              ) , 
 
			
		
	
		
		
			
				
					
					            ] , 
            ] , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -110,15 +104,15 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					          / /      ) , 
          / /      ) , 
 
			
		
	
		
		
			
				
					
					          / /    ) , 
          / /    ) , 
 
			
		
	
		
		
			
				
					
					          / /  ) , 
          / /  ) , 
 
			
		
	
		
		
			
				
					
					               / /  . paddingOnly ( right:  24. h ,  bottom:  24. h ) , 
          / /  . paddingOnly ( right:  24. h ,  bottom:  24. h ) , 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					          Column ( 
          Column ( 
 
			
		
	
		
		
			
				
					
					            crossAxisAlignment:  CrossAxisAlignment . start , 
            crossAxisAlignment:  CrossAxisAlignment . start , 
 
			
		
	
		
		
			
				
					
					            mainAxisSize:  MainAxisSize . min , 
            mainAxisSize:  MainAxisSize . min , 
 
			
		
	
		
		
			
				
					
					            spacing:  24. h , 
            spacing:  24. h , 
 
			
		
	
		
		
			
				
					
					            children:  [ 
            children:  [ 
 
			
		
	
		
		
			
				
					
					              TextInputWidget ( 
              TextInputWidget ( 
 
			
		
	
		
		
			
				
					
					                labelText:  " Enter Pickup Location Manually " . needTranslation , 
                labelText:  widget . isFromRRT !  ?  " Type Address " . needTranslation  :  " Enter Pickup Location Manually " . needTranslation , 
 
			
				
				
			
		
	
		
		
			
				
					
					                hintText:  " Enter Pickup Location " . needTranslation , 
                hintText:  widget . isFromRRT !  ?  " Enter street or area name " . needTranslation  :  " Enter Pickup Location " . needTranslation , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					                leadingIcon:  AppAssets . location_pickup , 
                leadingIcon:  AppAssets . location_pickup , 
 
			
		
	
		
		
			
				
					
					                isAllowLeadingIcon:  true , 
                isAllowLeadingIcon:  true , 
 
			
		
	
		
		
			
				
					
					                isEnable:  false , 
                isEnable:  false , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -126,50 +120,27 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					                autoFocus:  false , 
                autoFocus:  false , 
 
			
		
	
		
		
			
				
					
					                isBorderAllowed:  false , 
                isBorderAllowed:  false , 
 
			
		
	
		
		
			
				
					
					                keyboardType:  TextInputType . text , 
                keyboardType:  TextInputType . text , 
 
			
		
	
		
		
			
				
					
					                padding:  EdgeInsets . symmetric ( 
                controller:  addressController , 
 
			
				
				
			
		
	
		
		
			
				
					
					                  vertical:  ResponsiveExtension ( 10 ) . h , 
                padding:  EdgeInsets . symmetric ( vertical:  ResponsiveExtension ( 8 ) . h ,  horizontal:  ResponsiveExtension ( 12 ) . h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                  horizontal:  ResponsiveExtension ( 15 ) . h , 
              ) . paddingOnly ( right:  24. h ,  left:  24. h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                ) , 
 
			
		
	
		
		
			
				
					
					              ) . onPress ( ( )  { 
 
			
		
	
		
		
			
				
					
					                context 
 
			
		
	
		
		
			
				
					
					                    . read < EmergencyServicesViewModel > ( ) 
 
			
		
	
		
		
			
				
					
					                    . updateBottomSheetState ( BottomSheetType . EXPANDED ) ; 
 
			
		
	
		
		
			
				
					
					              } ) . paddingOnly ( right:  24. h ,  left:  24. h ) , 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					              SizedBox ( 
              SizedBox ( 
 
			
		
	
		
		
			
				
					
					                height:  200. h , 
                height:  200. h , 
 
			
		
	
		
		
			
				
					
					                child:  DecoratedBox ( 
                child:  DecoratedBox ( 
 
			
		
	
		
		
			
				
					
					                  decoration:  RoundedRectangleBorder ( ) . toSmoothCornerDecoration ( 
                  decoration:  RoundedRectangleBorder ( ) . toSmoothCornerDecoration ( 
 
			
		
	
		
		
			
				
					
					                    color:  AppColors . scaffoldBgColor , 
                    color:  AppColors . scaffoldBgColor , 
 
			
		
	
		
		
			
				
					
					                    customBorder:  BorderRadius . only ( 
                    customBorder:  BorderRadius . only ( topLeft:  Radius . circular ( 24. h ) ,  topRight:  Radius . circular ( 24. h ) ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                      topLeft:  Radius . circular ( 24. h ) , 
 
			
		
	
		
		
			
				
					
					                      topRight:  Radius . circular ( 24. h ) , 
 
			
		
	
		
		
			
				
					
					                    ) , 
 
			
		
	
		
		
	
		
		
			
				
					
					                  ) , 
                  ) , 
 
			
		
	
		
		
			
				
					
					                  child:  Column ( 
                  child:  Column ( 
 
			
		
	
		
		
			
				
					
					                    crossAxisAlignment:  CrossAxisAlignment . start , 
                    crossAxisAlignment:  CrossAxisAlignment . start , 
 
			
		
	
		
		
			
				
					
					                    spacing:  2 4.h  , 
                    spacing:  , 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                    children:  [ 
                    children:  [ 
 
			
		
	
		
		
			
				
					
					                      Column ( 
                      " Select Pickup Location " . needTranslation . toText21 ( weight:  FontWeight . w600 ,  color:  AppColors . textColor ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                        spacing:  4. h , 
                      "  Please select the location of pickup " . needTranslation . toText12 ( fontWeight:  FontWeight . w500 ,  color:  AppColors . greyTextColor ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                        children:  [ 
                      SizedBox ( height:  20. h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                          " Select Pickup Location " . needTranslation . toText21 ( 
 
			
		
	
		
		
			
				
					
					                                weight:  FontWeight . w600 , 
 
			
		
	
		
		
			
				
					
					                                color:  AppColors . textColor , 
 
			
		
	
		
		
			
				
					
					                              ) , 
 
			
		
	
		
		
			
				
					
					                          "  Please select the location of pickup " 
 
			
		
	
		
		
			
				
					
					                              . needTranslation 
 
			
		
	
		
		
			
				
					
					                              . toText12 ( 
 
			
		
	
		
		
			
				
					
					                                fontWeight:  FontWeight . w500 , 
 
			
		
	
		
		
			
				
					
					                                color:  AppColors . greyTextColor , 
 
			
		
	
		
		
			
				
					
					                              ) 
 
			
		
	
		
		
			
				
					
					                        ] , 
 
			
		
	
		
		
			
				
					
					                      ) , 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					                      CustomButton ( 
                      CustomButton ( 
 
			
		
	
		
		
			
				
					
					                          text:  " Select Location " . needTranslation , 
                          text:  " Select Location " . needTranslation , 
 
			
		
	
		
		
			
				
					
					                          onPressed:  ( )  { 
                          onPressed:  ( )  { 
 
			
		
	
		
		
			
				
					
					                            context 
                            context . read < EmergencyServicesViewModel > ( ) . updateBottomSheetState ( BottomSheetType . EXPANDED ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                                . read < EmergencyServicesViewModel > ( ) 
 
			
		
	
		
		
			
				
					
					                                . updateBottomSheetState ( BottomSheetType . EXPANDED ) ; 
 
			
		
	
		
		
	
		
		
			
				
					
					                          } ) 
                          } ) 
 
			
		
	
		
		
			
				
					
					                    ] , 
                    ] , 
 
			
		
	
		
		
			
				
					
					                  ) . paddingOnly ( top:  24. h ,  bottom:  32. h ,  left:  24. h ,  right:  24. h ) , 
                  ) . paddingOnly ( top:  24. h ,  bottom:  32. h ,  left:  24. h ,  right:  24. h ) , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -182,23 +153,20 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					    ) ; 
    ) ; 
 
			
		
	
		
		
			
				
					
					  } 
  } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					  Widget  Expan edBottomSheet( BuildContext  context )  { 
  Widget  expand edBottomSheet( BuildContext  context )  { 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    return  GestureDetector ( 
    return  GestureDetector ( 
 
			
		
	
		
		
			
				
					
					     onVerticalDragUpdate:  ( details ) { 
       onVerticalDragUpdate:  ( details )   { 
 
			
				
				
			
		
	
		
		
			
				
					
					       if ( details . delta . dy > 0 ) { 
         if   ( details . delta . dy   >   0 )   { 
 
			
				
				
			
		
	
		
		
			
				
					
					         context . read < EmergencyServicesViewModel > ( ) . updateBottomSheetState ( BottomSheetType . FIXED ) ; 
           context . read < EmergencyServicesViewModel > ( ) . updateBottomSheetState ( BottomSheetType . FIXED ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					       } 
         } 
 
			
				
				
			
		
	
		
		
			
				
					
					     } , 
       } , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					      child:  Column ( 
      child:  Column ( 
 
			
		
	
		
		
			
				
					
					        mainAxisSize:  MainAxisSize . min , 
        mainAxisSize:  MainAxisSize . min , 
 
			
		
	
		
		
			
				
					
					        children:  [ 
        children:  [ 
 
			
		
	
		
		
			
				
					
					          DecoratedBox ( 
          DecoratedBox ( 
 
			
		
	
		
		
			
				
					
					            decoration:  RoundedRectangleBorder ( ) . toSmoothCornerDecoration ( 
            decoration:  RoundedRectangleBorder ( ) . toSmoothCornerDecoration ( 
 
			
		
	
		
		
			
				
					
					              color:  AppColors . scaffoldBgColor , 
              color:  AppColors . scaffoldBgColor , 
 
			
		
	
		
		
			
				
					
					              customBorder:  BorderRadius . only ( 
              customBorder:  BorderRadius . only ( topLeft:  Radius . circular ( 24. h ) ,  topRight:  Radius . circular ( 24. h ) ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                topLeft:  Radius . circular ( 24. h ) , 
 
			
		
	
		
		
			
				
					
					                topRight:  Radius . circular ( 24. h ) , 
 
			
		
	
		
		
			
				
					
					              ) , 
 
			
		
	
		
		
	
		
		
			
				
					
					            ) , 
            ) , 
 
			
		
	
		
		
			
				
					
					            child:  Column ( 
            child:  Column ( 
 
			
		
	
		
		
			
				
					
					              children:  [ 
              children:  [ 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -207,17 +175,12 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					                    crossAxisAlignment:  CrossAxisAlignment . start , 
                    crossAxisAlignment:  CrossAxisAlignment . start , 
 
			
		
	
		
		
			
				
					
					                    spacing:  16. h , 
                    spacing:  16. h , 
 
			
		
	
		
		
			
				
					
					                    children:  [ 
                    children:  [ 
 
			
		
	
		
		
			
				
					
					                      " Select Pickup Location " . needTranslation . toText21 ( 
                      " Select Pickup Location " . needTranslation . toText21 ( weight:  FontWeight . w600 ,  color:  AppColors . textColor ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                            weight:  FontWeight . w600 , 
 
			
		
	
		
		
			
				
					
					                            color:  AppColors . textColor , 
 
			
		
	
		
		
			
				
					
					                          ) , 
 
			
		
	
		
		
	
		
		
			
				
					
					                      locationsSections ( context ) , 
                      locationsSections ( context ) , 
 
			
		
	
		
		
			
				
					
					                      hospitalAndPickUpSection ( context ) , 
                      widget . isFromRRT !  ?  SizedBox ( )  :  hospitalAndPickUpSection ( context ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                        
 
			
		
	
		
		
	
		
		
			
				
					
					                    ] , 
                    ] , 
 
			
		
	
		
		
			
				
					
					                  ) . paddingOnly ( top:  24. h ,  bottom:  32. h , left:  24. h ,  right:  24. h ) , 
                  ) . paddingOnly ( top:  24. h ,  bottom:  32. h ,   left:  24. h ,  right:  24. h ) , 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                ) , 
                ) , 
 
			
		
	
		
		
			
				
					
					                
 
			
		
	
		
		
			
				
					
					                bottomPriceContent ( context ) 
                bottomPriceContent ( context ) 
 
			
		
	
		
		
			
				
					
					              ] , 
              ] , 
 
			
		
	
		
		
			
				
					
					            ) , 
            ) , 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -249,8 +212,7 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					            shrinkWrap:  true , 
            shrinkWrap:  true , 
 
			
		
	
		
		
			
				
					
					            itemCount:  3 , 
            itemCount:  3 , 
 
			
		
	
		
		
			
				
					
					            itemBuilder:  ( __ ,  index )  { 
            itemBuilder:  ( __ ,  index )  { 
 
			
		
	
		
		
			
				
					
					              if  ( index  = = 
              if  ( index  = =  2 )  / /  todo  means  the  end  of  the  list  so  handle  as  per  the  viewmodel 
 
			
				
				
			
		
	
		
		
			
				
					
					                  2 )  / /  todo  means  the  end  of  the  list  so  handle  as  per  the  viewmodel 
 
			
		
	
		
		
	
		
		
			
				
					
					              { 
              { 
 
			
		
	
		
		
			
				
					
					                return  CustomButton ( 
                return  CustomButton ( 
 
			
		
	
		
		
			
				
					
					                    height:  40. h , 
                    height:  40. h , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -264,11 +226,8 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					              }  else  { 
              }  else  { 
 
			
		
	
		
		
			
				
					
					                return  AddressItem ( 
                return  AddressItem ( 
 
			
		
	
		
		
			
				
					
					                  isSelected:  index  = =  0 , 
                  isSelected:  index  = =  0 , 
 
			
		
	
		
		
			
				
					
					                  address: 
                  address:  " Flat No 301, Building No 12, Palm Spring Apartment, Sector 45, Gurugram, Haryana 122003 " , 
 
			
				
				
			
		
	
		
		
			
				
					
					                      " Flat No 301, Building No 12, Palm Spring Apartment, Sector 45, Gurugram, Haryana 122003 " , 
                  title:  index  = =  0  ?  " Home " . needTranslation  :  " Work " . needTranslation , 
 
			
				
				
			
		
	
		
		
			
				
					
					                  title:  index  = =  0 
 
			
		
	
		
		
			
				
					
					                      ?  " Home " . needTranslation 
 
			
		
	
		
		
			
				
					
					                      :  " Work " . needTranslation , 
 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					                  onTap:  ( )  { } , 
                  onTap:  ( )  { } , 
 
			
		
	
		
		
			
				
					
					                ) ; 
                ) ; 
 
			
		
	
		
		
			
				
					
					              } 
              } 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -293,11 +252,9 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					                subTitle:  " hospital " . needTranslation , 
                subTitle:  " hospital " . needTranslation , 
 
			
		
	
		
		
			
				
					
					                leadingIcon:  AppAssets . hospital , 
                leadingIcon:  AppAssets . hospital , 
 
			
		
	
		
		
			
				
					
					              ) , 
              ) , 
 
			
		
	
		
		
			
				
					
					              Utils . buildSvgWithAssets ( icon:  AppAssets . down_cheveron , 
              Utils . buildSvgWithAssets ( icon:  AppAssets . down_cheveron ,  width:  24. h ,  height:  24. h ) . paddingAll ( 16. h ) 
 
			
				
				
			
		
	
		
		
			
				
					
					                      width:  24. h ,  height:  24. h ) 
 
			
		
	
		
		
			
				
					
					                  . paddingAll ( 16. h ) 
 
			
		
	
		
		
	
		
		
			
				
					
					            ] , 
            ] , 
 
			
		
	
		
		
			
				
					
					          ) . onPress ( ( ) { 
          ) . onPress ( ( )  { 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            showHospitalBottomSheet ( context ) ; 
            showHospitalBottomSheet ( context ) ; 
 
			
		
	
		
		
			
				
					
					          } ) , 
          } ) , 
 
			
		
	
		
		
			
				
					
					          SizedBox ( height:  16. h ) , 
          SizedBox ( height:  16. h ) , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -307,7 +264,6 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					            thickness:  1 , 
            thickness:  1 , 
 
			
		
	
		
		
			
				
					
					          ) , 
          ) , 
 
			
		
	
		
		
			
				
					
					          SizedBox ( height:  16. h ) , 
          SizedBox ( height:  16. h ) , 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					          Row ( 
          Row ( 
 
			
		
	
		
		
			
				
					
					            children:  [ 
            children:  [ 
 
			
		
	
		
		
			
				
					
					              hospitalAndPickUpItemContent ( 
              hospitalAndPickUpItemContent ( 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -317,8 +273,8 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					              ) , 
              ) , 
 
			
		
	
		
		
			
				
					
					              CustomSwitch ( 
              CustomSwitch ( 
 
			
		
	
		
		
			
				
					
					                value:  context . watch < EmergencyServicesViewModel > ( ) . isGMSAvailable , 
                value:  context . watch < EmergencyServicesViewModel > ( ) . isGMSAvailable , 
 
			
		
	
		
		
			
				
					
					                onChanged:  ( value ) { 
                onChanged:  ( value )   { 
 
			
				
				
			
		
	
		
		
			
				
					
					                  context . read < EmergencyServicesViewModel > ( ) . setIsGMSAvailable (   value ) ; 
                  context . read < EmergencyServicesViewModel > ( ) . setIsGMSAvailable ( value ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					                } , 
                } , 
 
			
		
	
		
		
			
				
					
					              ) 
              ) 
 
			
		
	
		
		
			
				
					
					            ] , 
            ] , 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -378,68 +334,49 @@ class CallAmbulancePage extends StatelessWidget {
 
			
		
	
		
		
			
				
					
					      mainAxisSize:  MainAxisSize . min , 
      mainAxisSize:  MainAxisSize . min , 
 
			
		
	
		
		
			
				
					
					      crossAxisAlignment:  CrossAxisAlignment . end , 
      crossAxisAlignment:  CrossAxisAlignment . end , 
 
			
		
	
		
		
			
				
					
					      children:  [ 
      children:  [ 
 
			
		
	
		
		
			
				
					
					            DecoratedBox ( 
        DecoratedBox ( 
 
			
				
				
			
		
	
		
		
			
				
					
					              decoration:  RoundedRectangleBorder ( ) . toSmoothCornerDecoration ( 
          decoration:  RoundedRectangleBorder ( ) 
 
			
				
				
			
		
	
		
		
			
				
					
					                color:  AppColors . scaffoldBgColor , 
              . toSmoothCornerDecoration ( color:  AppColors . scaffoldBgColor ,  customBorder:  BorderRadius . only ( topLeft:  Radius . circular ( 24. h ) ,  topRight:  Radius . circular ( 24. h ) ) ,  hasShadow:  true ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                customBorder:  BorderRadius . only ( 
          child:  Column ( 
 
			
				
				
			
		
	
		
		
			
				
					
					                  topLeft:  Radius . circular ( 24. h ) , 
            crossAxisAlignment:  CrossAxisAlignment . start , 
 
			
				
				
			
		
	
		
		
			
				
					
					                  topRight:  Radius . circular ( 24. h ) , 
            spacing:  12. h , 
 
			
				
				
			
		
	
		
		
			
				
					
					                ) , 
            children:  [ 
 
			
				
				
			
		
	
		
		
			
				
					
					                hasShadow:  true 
              Row ( 
 
			
				
				
			
		
	
		
		
			
				
					
					              ) , 
 
			
		
	
		
		
			
				
					
					              child:  Column ( 
 
			
		
	
		
		
			
				
					
					                crossAxisAlignment:  CrossAxisAlignment . start , 
 
			
		
	
		
		
			
				
					
					                spacing:  12. h , 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					                children:  [ 
                children:  [ 
 
			
		
	
		
		
			
				
					
					                  Row ( 
                  Expanded ( 
 
			
				
				
			
		
	
		
		
			
				
					
					                    children:  [ 
                    child:  Column ( 
 
			
				
				
			
		
	
		
		
			
				
					
					                      Expanded ( 
                      crossAxisAlignment:  CrossAxisAlignment . start , 
 
			
				
				
			
		
	
		
		
			
				
					
					                        child:  Column ( 
                      spacing:  4. h , 
 
			
				
				
			
		
	
		
		
			
				
					
					                          crossAxisAlignment:  CrossAxisAlignment . start , 
                      children:  [ 
 
			
				
				
			
		
	
		
		
			
				
					
					                          spacing:  4. h , 
                        " Total amount to pay " . needTranslation . toText18 ( weight:  FontWeight . w600 ,  color:  AppColors . textColor ) , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					                        Row ( 
 
			
		
	
		
		
			
				
					
					                          children:  [ 
                          children:  [ 
 
			
		
	
		
		
			
				
					
					                            " Total amount to pay " . needTranslation . toText18 ( 
                            Utils . buildSvgWithAssets ( icon:  AppAssets . warning ,  height:  18. h ,  width:  18. h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                              weight:  FontWeight . w600 , 
                            SizedBox ( width:  4. h ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                              color:  AppColors . textColor , 
                            " Amount will be paid at the hospital " . needTranslation . toText12 ( fontWeight:  FontWeight . w500 ,  color:  AppColors . greyTextColor ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                            ) , 
 
			
		
	
		
		
			
				
					
					                            Row ( 
 
			
		
	
		
		
			
				
					
					                              children:  [ 
 
			
		
	
		
		
			
				
					
					                                Utils . buildSvgWithAssets ( icon:  AppAssets . warning , 
 
			
		
	
		
		
			
				
					
					                                height:  18. h ,  width:  18. h ) , 
 
			
		
	
		
		
			
				
					
					                                SizedBox ( width:  4. h , ) , 
 
			
		
	
		
		
			
				
					
					                                " Amount will be paid at the hospital " 
 
			
		
	
		
		
			
				
					
					                                    . needTranslation 
 
			
		
	
		
		
			
				
					
					                                    . toText12 ( 
 
			
		
	
		
		
			
				
					
					                                  fontWeight:  FontWeight . w500 , 
 
			
		
	
		
		
			
				
					
					                                  color:  AppColors . greyTextColor , 
 
			
		
	
		
		
			
				
					
					                                ) , 
 
			
		
	
		
		
			
				
					
					                              ] , 
 
			
		
	
		
		
			
				
					
					                            ) 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					                          ] , 
                          ] , 
 
			
		
	
		
		
			
				
					
					                        ) , 
                        ) 
 
			
				
				
			
		
	
		
		
			
				
					
					                      ) , 
                      ] , 
 
			
				
				
			
		
	
		
		
			
				
					
					                      " \$ 250 " . toText24 ( 
                    ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                        fontWeight:  FontWeight . w600 , 
 
			
		
	
		
		
			
				
					
					                        color:  AppColors . textColor , 
 
			
		
	
		
		
			
				
					
					                      ) 
 
			
		
	
		
		
			
				
					
					                    ] , 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					                  ) , 
                  ) , 
 
			
		
	
		
		
			
				
					
					                  CustomButton ( 
                  Utils . getPaymentAmountWithSymbol ( " 250 " . toString ( ) . toText24 ( isBold:  true ) ,  AppColors . blackColor ,  17 ,  isSaudiCurrency:  true ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                      text:  " Submit Request " . needTranslation , 
 
			
		
	
		
		
			
				
					
					                      onPressed:  ( )  { 
 
			
		
	
		
		
			
				
					
					                        Navigator . push ( context ,  CustomPageRoute ( page:  RequestingServicesPage ( ) ) ) ; 
 
			
		
	
		
		
			
				
					
					                      } ) 
 
			
		
	
		
		
	
		
		
			
				
					
					                ] , 
                ] , 
 
			
		
	
		
		
			
				
					
					              ) . paddingOnly ( top:  24. h ,  bottom:  12. h ,  left:  24. h ,  right:  24. h ) , 
              ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					            ) , 
              CustomButton ( 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					                  text:  " Submit Request " . needTranslation , 
 
			
		
	
		
		
			
				
					
					                  onPressed:  ( )  { 
 
			
		
	
		
		
			
				
					
					                    Navigator . push ( context ,  CustomPageRoute ( page:  RequestingServicesPage ( ) ) ) ; 
 
			
		
	
		
		
			
				
					
					                  } ) 
 
			
		
	
		
		
			
				
					
					            ] , 
 
			
		
	
		
		
			
				
					
					          ) . paddingOnly ( top:  24. h ,  bottom:  24. h ,  left:  24. h ,  right:  24. h ) , 
 
			
		
	
		
		
			
				
					
					        ) , 
 
			
		
	
		
		
			
				
					
					      ] , 
      ] , 
 
			
		
	
		
		
			
				
					
					    ) ; 
    ) ; 
 
			
		
	
		
		
			
				
					
					  } 
  } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					  showHospitalBottomSheet ( BuildContext  context ) { 
  showHospitalBottomSheet ( BuildContext  context )   { 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    showCommonBottomSheetWithoutHeight ( 
    showCommonBottomSheetWithoutHeight ( 
 
			
		
	
		
		
			
				
					
					      title: 
      title:  LocaleKeys . selectHospital . tr ( ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					      LocaleKeys . selectHospital . tr ( ) , 
 
			
		
	
		
		
	
		
		
			
				
					
					      context , 
      context , 
 
			
		
	
		
		
			
				
					
					      child:  HospitalBottomSheetBody ( ) , 
      child:  HospitalBottomSheetBody ( ) , 
 
			
		
	
		
		
			
				
					
					      isFullScreen:  false , 
      isFullScreen:  false ,