login flow complete
							parent
							
								
									58d33e2dae
								
							
						
					
					
						commit
						299c0b0e29
					
				| @ -0,0 +1,113 @@ | ||||
| import 'dart:convert'; | ||||
| 
 | ||||
| class GetUserMobileDeviceData { | ||||
|   int? patientMobileNumber; | ||||
|   String? mobileNo; | ||||
|   String? deviceToken; | ||||
|   bool? projectOutSa; | ||||
|   int? loginType; | ||||
|   String? zipCode; | ||||
|   bool? isRegister; | ||||
|   String? logInTokenId; | ||||
|   int? searchType; | ||||
|   int? patientId; | ||||
|   String? nationalId; | ||||
|   String? patientIdentificationId; | ||||
|   int? otpSendType; | ||||
|   int? languageId; | ||||
|   double? versionId; | ||||
|   int? channel; | ||||
|   String? ipAdress; | ||||
|   String? generalid; | ||||
|   int? patientOutSa; | ||||
|   bool? isDentalAllowedBackend; | ||||
|   int? deviceTypeId; | ||||
|   double? latitude; | ||||
|   double? longitude; | ||||
|   int? patientType; | ||||
| 
 | ||||
|   GetUserMobileDeviceData({ | ||||
|     this.patientMobileNumber, | ||||
|     this.mobileNo, | ||||
|     this.deviceToken, | ||||
|     this.projectOutSa, | ||||
|     this.loginType, | ||||
|     this.zipCode, | ||||
|     this.isRegister, | ||||
|     this.logInTokenId, | ||||
|     this.searchType, | ||||
|     this.patientId, | ||||
|     this.nationalId, | ||||
|     this.patientIdentificationId, | ||||
|     this.otpSendType, | ||||
|     this.languageId, | ||||
|     this.versionId, | ||||
|     this.channel, | ||||
|     this.ipAdress, | ||||
|     this.generalid, | ||||
|     this.patientOutSa, | ||||
|     this.isDentalAllowedBackend, | ||||
|     this.deviceTypeId, | ||||
|     this.latitude, | ||||
|     this.longitude, | ||||
|     this.patientType, | ||||
|   }); | ||||
| 
 | ||||
|   factory GetUserMobileDeviceData.fromRawJson(String str) => GetUserMobileDeviceData.fromJson(json.decode(str)); | ||||
| 
 | ||||
|   String toRawJson() => json.encode(toJson()); | ||||
| 
 | ||||
|   factory GetUserMobileDeviceData.fromJson(Map<String, dynamic> json) => GetUserMobileDeviceData( | ||||
|     patientMobileNumber: json["PatientMobileNumber"], | ||||
|     mobileNo: json["MobileNo"], | ||||
|     deviceToken: json["DeviceToken"], | ||||
|     projectOutSa: json["ProjectOutSA"], | ||||
|     loginType: json["LoginType"], | ||||
|     zipCode: json["ZipCode"], | ||||
|     isRegister: json["isRegister"], | ||||
|     logInTokenId: json["LogInTokenID"], | ||||
|     searchType: json["SearchType"], | ||||
|     patientId: json["PatientID"], | ||||
|     nationalId: json["NationalID"], | ||||
|     patientIdentificationId: json["PatientIdentificationID"], | ||||
|     otpSendType: json["OTP_SendType"], | ||||
|     languageId: json["LanguageID"], | ||||
|     versionId: json["VersionID"]?.toDouble(), | ||||
|     channel: json["Channel"], | ||||
|     ipAdress: json["IPAdress"], | ||||
|     generalid: json["generalid"], | ||||
|     patientOutSa: json["PatientOutSA"], | ||||
|     isDentalAllowedBackend: json["isDentalAllowedBackend"], | ||||
|     deviceTypeId: json["DeviceTypeID"], | ||||
|     latitude: json["Latitude"], | ||||
|     longitude: json["Longitude"], | ||||
|     patientType: json["PatientType"], | ||||
|   ); | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() => { | ||||
|     "PatientMobileNumber": patientMobileNumber, | ||||
|     "MobileNo": mobileNo, | ||||
|     "DeviceToken": deviceToken, | ||||
|     "ProjectOutSA": projectOutSa, | ||||
|     "LoginType": loginType, | ||||
|     "ZipCode": zipCode, | ||||
|     "isRegister": isRegister, | ||||
|     "LogInTokenID": logInTokenId, | ||||
|     "SearchType": searchType, | ||||
|     "PatientID": patientId, | ||||
|     "NationalID": nationalId, | ||||
|     "PatientIdentificationID": patientIdentificationId, | ||||
|     "OTP_SendType": otpSendType, | ||||
|     "LanguageID": languageId, | ||||
|     "VersionID": versionId, | ||||
|     "Channel": channel, | ||||
|     "IPAdress": ipAdress, | ||||
|     "generalid": generalid, | ||||
|     "PatientOutSA": patientOutSa, | ||||
|     "isDentalAllowedBackend": isDentalAllowedBackend, | ||||
|     "DeviceTypeID": deviceTypeId, | ||||
|     "Latitude": latitude, | ||||
|     "Longitude": longitude, | ||||
|     "PatientType": patientType, | ||||
|   }; | ||||
| } | ||||
| @ -0,0 +1,45 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:get_it/get_it.dart'; | ||||
| import 'package:hmg_patient_app_new/core/dependencies.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/utils.dart'; | ||||
| import 'package:hmg_patient_app_new/services/navigation_service.dart'; | ||||
| 
 | ||||
| class LoaderBottomSheet { | ||||
|   static final NavigationService _navService = GetIt.I<NavigationService>(); | ||||
|   static bool _isVisible = false; | ||||
| 
 | ||||
|   static void showLoader() { | ||||
|     if (_isVisible) return; | ||||
| 
 | ||||
|     _isVisible = true; | ||||
| 
 | ||||
|     showModalBottomSheet( | ||||
|       context: _navService.navigatorKey.currentContext!, | ||||
|       isDismissible: false, | ||||
|       enableDrag: false, | ||||
|       backgroundColor: Colors.transparent, | ||||
|       builder: (_) { | ||||
|         return Container( | ||||
|           height: MediaQuery.of(_navService.navigatorKey.currentContext!).size.height * 0.3, | ||||
|           decoration: const BoxDecoration( | ||||
|             color: Colors.white, | ||||
|             borderRadius: BorderRadius.vertical(top: Radius.circular(16)), | ||||
|           ), | ||||
|           child: Center( | ||||
|             child: Utils.getLoadingWidget(), | ||||
|           ), | ||||
|         ); | ||||
|       }, | ||||
|     ).whenComplete(() { | ||||
|       // reset state if dismissed by system | ||||
|       _isVisible = false; | ||||
|     }); | ||||
|   } | ||||
| 
 | ||||
|   static void hideLoader() { | ||||
|     if (_isVisible) { | ||||
|       Navigator.of(_navService.navigatorKey.currentContext!).pop(); | ||||
|       _isVisible = false; | ||||
|     } | ||||
|   } | ||||
| } | ||||
					Loading…
					
					
				
		Reference in New Issue