commit
						215f3f3335
					
				
											
												Binary file not shown.
											
										
									
								| After Width: | Height: | Size: 71 KiB | 
| @ -0,0 +1,3 @@ | |||||||
|  | <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path fill-rule="evenodd" clip-rule="evenodd" d="M0.9375 9C0.9375 13.4528 4.54725 17.0625 9 17.0625C13.4528 17.0625 17.0625 13.4528 17.0625 9C17.0625 4.54725 13.4528 0.9375 9 0.9375C4.54725 0.9375 0.9375 4.54725 0.9375 9ZM12.507 6.19724C12.8123 6.47699 12.8325 6.95173 12.5528 7.25698L8.42776 11.757C8.28976 11.9077 8.0955 11.9955 7.8915 12C7.68675 12.0045 7.4895 11.925 7.34475 11.7803L5.46975 9.90527C5.1765 9.61277 5.1765 9.13723 5.46975 8.84473C5.76225 8.55148 6.23776 8.55148 6.53026 8.84473L7.85175 10.1655L11.4472 6.24302C11.727 5.93777 12.2018 5.91749 12.507 6.19724Z" fill="#8F9AA3"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 697 B | 
| @ -0,0 +1,3 @@ | |||||||
|  | <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path fill-rule="evenodd" clip-rule="evenodd" d="M9.04288 1.3125C10.6859 1.31249 11.9764 1.31248 12.984 1.44795C14.0165 1.58676 14.8357 1.87704 15.4793 2.52069C16.123 3.16433 16.4132 3.98352 16.5521 5.01602C16.6875 6.02358 16.6875 7.31408 16.6875 8.9571V9.04288C16.6875 10.6859 16.6875 11.9764 16.5521 12.984C16.4132 14.0165 16.123 14.8357 15.4793 15.4793C14.8357 16.123 14.0165 16.4132 12.984 16.5521C11.9764 16.6875 10.6859 16.6875 9.0429 16.6875H8.95712C7.3141 16.6875 6.02358 16.6875 5.01602 16.5521C3.98352 16.4132 3.16433 16.123 2.52068 15.4793C1.87704 14.8357 1.58676 14.0165 1.44795 12.984C1.31248 11.9764 1.31249 10.6859 1.3125 9.04288V8.95712C1.31249 7.31409 1.31248 6.02358 1.44795 5.01602C1.58676 3.98352 1.87704 3.16433 2.52068 2.52069C3.16433 1.87704 3.98352 1.58676 5.01602 1.44795C6.02358 1.31248 7.31409 1.31249 8.95712 1.3125H9.04288ZM8.25 12.375C8.25 11.9608 8.58428 11.625 8.99665 11.625H9.00335C9.41571 11.625 9.75 11.9608 9.75 12.375C9.75 12.7892 9.41571 13.125 9.00335 13.125H8.99665C8.58428 13.125 8.25 12.7892 8.25 12.375ZM8.25009 9.375C8.25009 9.78921 8.58588 10.125 9.00009 10.125C9.4143 10.125 9.75009 9.78921 9.75009 9.375V6.375C9.75009 5.96079 9.4143 5.625 9.00009 5.625C8.58588 5.625 8.25009 5.96079 8.25009 6.375V9.375Z" fill="#ED1C2B"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 1.3 KiB | 
| @ -0,0 +1,3 @@ | |||||||
|  | <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M6.41841 13.0471C6.53944 12.9557 6.90075 12.6828 7.10903 12.5202C7.52619 12.1947 8.08051 11.7498 8.63318 11.27C9.18864 10.7877 9.72961 10.2811 10.1273 9.83098C10.3267 9.6053 10.4782 9.40705 10.5769 9.24345C10.6696 9.08959 10.6889 8.9987 10.6889 8.9987C10.6889 8.9987 10.6696 8.91048 10.5769 8.75662C10.4782 8.59303 10.3267 8.39477 10.1273 8.16909C9.72961 7.71901 9.18864 7.21237 8.63317 6.73009C8.08049 6.25024 7.52617 5.80541 7.10901 5.47985C6.90072 5.31731 6.53992 5.04475 6.41889 4.95334C6.16875 4.76911 6.1148 4.41661 6.29902 4.16647C6.48325 3.91633 6.83537 3.86289 7.08551 4.04711L7.08742 4.04855C7.21436 4.14443 7.58862 4.42711 7.80114 4.59296C8.22772 4.92586 8.7984 5.38369 9.37073 5.8806C9.94026 6.37509 10.5243 6.91935 10.9704 7.42418C11.1928 7.67596 11.3929 7.93118 11.5403 8.1758C11.6785 8.40499 11.8144 8.69516 11.8144 9.00004C11.8144 9.30492 11.6785 9.59509 11.5403 9.82427C11.3929 10.0689 11.1928 10.3241 10.9704 10.5759C10.5243 11.0807 9.94027 11.625 9.37074 12.1195C8.79842 12.6164 8.22775 13.0742 7.80117 13.4071C7.5885 13.5731 7.21423 13.8558 7.08755 13.9515L7.08591 13.9527C6.83577 14.1369 6.48329 14.0837 6.29906 13.8336C6.11484 13.5835 6.16829 13.2313 6.41841 13.0471Z" fill="#161616"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 1.3 KiB | 
| @ -0,0 +1,3 @@ | |||||||
|  | <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path fill-rule="evenodd" clip-rule="evenodd" d="M11 0.25C5.06294 0.25 0.25 5.06294 0.25 11C0.25 16.9371 5.06294 21.75 11 21.75C16.9371 21.75 21.75 16.9371 21.75 11C21.75 5.06294 16.9371 0.25 11 0.25ZM7 10C6.44772 10 6 10.4477 6 11C6 11.5523 6.44772 12 7 12H15C15.5523 12 16 11.5523 16 11C16 10.4477 15.5523 10 15 10H7Z" fill="#ED1C2B"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 441 B | 
| @ -0,0 +1,8 @@ | |||||||
|  | <svg width="17" height="18" viewBox="0 0 17 18" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M4.37427 0.9375C3.12631 0.9375 2.12427 1.95016 2.12427 3.1875C2.12427 4.42484 3.12631 5.4375 4.37427 5.4375C5.62222 5.4375 6.62427 4.42484 6.62427 3.1875C6.62427 1.95016 5.62222 0.9375 4.37427 0.9375Z" fill="#ED1C2B"/> | ||||||
|  | <path d="M6.67566 6.3702C5.2645 5.6266 3.48447 5.6266 2.0733 6.3702C2.03796 6.38882 1.99128 6.41204 1.93632 6.43938C1.67362 6.57008 1.22162 6.79494 0.913308 7.062C0.724359 7.22567 0.488314 7.48646 0.444083 7.84456C0.394558 8.24552 0.602042 8.58044 0.898469 8.83036C1.3683 9.22647 1.95554 9.5625 2.72106 9.5625L6.02791 9.5625C6.79342 9.5625 7.38067 9.22647 7.85049 8.83035C8.14692 8.58044 8.35441 8.24552 8.30488 7.84456C8.26065 7.48646 8.0246 7.22567 7.83565 7.062C7.52733 6.79493 7.07534 6.57007 6.81264 6.43938C6.75768 6.41204 6.71101 6.38882 6.67566 6.3702Z" fill="#ED1C2B"/> | ||||||
|  | <path d="M9.36201 1.8557C9.49867 1.63459 9.74007 1.5 10 1.5C12.9021 1.5 15.25 3.84793 15.25 6.75C15.25 7.16421 14.9142 7.5 14.5 7.5C14.0858 7.5 13.75 7.16421 13.75 6.75C13.75 5.30962 12.9412 4.06093 11.7522 3.43259L11.1504 4.03441C11.0364 4.14842 10.9065 4.25631 10.7469 4.27867C10.4366 4.32214 10.1199 4.16679 9.97204 3.87112L9.32918 2.58541C9.21293 2.35292 9.22536 2.07681 9.36201 1.8557Z" fill="#ED1C2B"/> | ||||||
|  | <path d="M2.5 10.5C2.91421 10.5 3.25 10.8358 3.25 11.25C3.25 12.6904 4.05882 13.9391 5.24779 14.5674L5.84961 13.9656C5.96361 13.8516 6.09348 13.7437 6.25314 13.7213C6.56336 13.6779 6.88013 13.8332 7.02796 14.1289L7.67082 15.4146C7.78707 15.6471 7.77464 15.9232 7.63799 16.1443C7.50133 16.3654 7.25993 16.5 7 16.5C4.09793 16.5 1.75 14.1521 1.75 11.25C1.75 10.8358 2.08579 10.5 2.5 10.5Z" fill="#ED1C2B"/> | ||||||
|  | <path d="M10.375 10.6875C10.375 9.45016 11.377 8.4375 12.625 8.4375C13.873 8.4375 14.875 9.45016 14.875 10.6875C14.875 11.9248 13.873 12.9375 12.625 12.9375C11.377 12.9375 10.375 11.9248 10.375 10.6875Z" fill="#ED1C2B"/> | ||||||
|  | <path d="M10.324 13.8702C11.7352 13.1266 13.5152 13.1266 14.9264 13.8702C14.9617 13.8888 15.0084 13.912 15.0634 13.9394C15.3261 14.0701 15.7781 14.2949 16.0864 14.562C16.2753 14.7257 16.5114 14.9865 16.5556 15.3446C16.6051 15.7455 16.3977 16.0804 16.1012 16.3304C15.6314 16.7265 15.0442 17.0625 14.2786 17.0625H10.9718C10.2063 17.0625 9.61903 16.7265 9.1492 16.3304C8.85277 16.0804 8.64529 15.7455 8.69482 15.3446C8.73905 14.9865 8.97509 14.7257 9.16404 14.562C9.47235 14.2949 9.92433 14.0701 10.187 13.9394C10.242 13.9121 10.2887 13.8888 10.324 13.8702Z" fill="#ED1C2B"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 2.5 KiB | 
| @ -0,0 +1,57 @@ | |||||||
|  | import 'dart:convert'; | ||||||
|  | 
 | ||||||
|  | class FamilyFileRequest { | ||||||
|  |   int? sharedPatientId; | ||||||
|  |   String? sharedPatientIdentificationId; | ||||||
|  |   int? searchType; | ||||||
|  |   String? sharedPatientMobileNumber; | ||||||
|  |   String? zipCode; | ||||||
|  |   bool? isRegister; | ||||||
|  |   int? patientStatus; | ||||||
|  |   bool? isDentalAllowedBackend; | ||||||
|  |   bool? isPatientExcluded; | ||||||
|  |   int? responseID; | ||||||
|  | 
 | ||||||
|  |   FamilyFileRequest({ | ||||||
|  |     this.sharedPatientId, | ||||||
|  |     this.sharedPatientIdentificationId, | ||||||
|  |     this.searchType, | ||||||
|  |     this.sharedPatientMobileNumber, | ||||||
|  |     this.zipCode, | ||||||
|  |     this.isRegister, | ||||||
|  |     this.patientStatus, | ||||||
|  |     this.isDentalAllowedBackend, | ||||||
|  |     this.isPatientExcluded, | ||||||
|  |     this.responseID, | ||||||
|  |   }); | ||||||
|  | 
 | ||||||
|  |   factory FamilyFileRequest.fromRawJson(String str) => FamilyFileRequest.fromJson(json.decode(str)); | ||||||
|  | 
 | ||||||
|  |   String toRawJson() => json.encode(toJson()); | ||||||
|  | 
 | ||||||
|  |   factory FamilyFileRequest.fromJson(Map<String, dynamic> json) => FamilyFileRequest( | ||||||
|  |         sharedPatientId: json["sharedPatientID"], | ||||||
|  |         sharedPatientIdentificationId: json["sharedPatientIdentificationID"], | ||||||
|  |         searchType: json["searchType"], | ||||||
|  |         sharedPatientMobileNumber: json["sharedPatientMobileNumber"], | ||||||
|  |         zipCode: json["zipCode"], | ||||||
|  |         isRegister: json["isRegister"], | ||||||
|  |         patientStatus: json["patientStatus"], | ||||||
|  |         isDentalAllowedBackend: json["isDentalAllowedBackend"], | ||||||
|  |         isPatientExcluded: json["IsPatientExcluded"], | ||||||
|  |         responseID: json["ReponseID"], | ||||||
|  |       ); | ||||||
|  | 
 | ||||||
|  |   Map<String, dynamic> toJson() => { | ||||||
|  |         "SharedPatientID": sharedPatientId, | ||||||
|  |         "SharedPatientIdentificationID": sharedPatientIdentificationId, | ||||||
|  |         "SearchType": searchType, | ||||||
|  |         "SharedPatientMobileNumber": sharedPatientMobileNumber, | ||||||
|  |         "zipCode": zipCode, | ||||||
|  |         "isRegister": isRegister, | ||||||
|  |         "PatientStatus": patientStatus, | ||||||
|  |         "isDentalAllowedBackend": isDentalAllowedBackend, | ||||||
|  |         "IsPatientExcluded": isPatientExcluded, | ||||||
|  |         "ReponseID": responseID, | ||||||
|  |       }; | ||||||
|  | } | ||||||
| @ -0,0 +1,105 @@ | |||||||
|  | import 'package:easy_localization/easy_localization.dart'; | ||||||
|  | import 'package:flutter/cupertino.dart'; | ||||||
|  | import 'package:flutter/material.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/app_assets.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/dependencies.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/enums.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/utils/validation_utils.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/theme/colors.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/widgets/dropdown/country_dropdown_widget.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/widgets/input_widget.dart'; | ||||||
|  | 
 | ||||||
|  | class FamilyFileAddWidget extends StatelessWidget { | ||||||
|  |   final Function()? onVerificationPress; | ||||||
|  |   final String message; | ||||||
|  | 
 | ||||||
|  |   const FamilyFileAddWidget(this.onVerificationPress, this.message, {super.key}); | ||||||
|  | 
 | ||||||
|  |   @override | ||||||
|  |   Widget build(BuildContext context) { | ||||||
|  |     AuthenticationViewModel authVm = getIt.get<AuthenticationViewModel>(); | ||||||
|  |     MedicalFileViewModel? medicalVM = getIt.get<MedicalFileViewModel>(); | ||||||
|  |     // TODO: implement build | ||||||
|  |     return Column( | ||||||
|  |       crossAxisAlignment: CrossAxisAlignment.start, | ||||||
|  |       mainAxisAlignment: MainAxisAlignment.start, | ||||||
|  |       mainAxisSize: MainAxisSize.min, | ||||||
|  |       children: [ | ||||||
|  |         message.toText16(color: AppColors.textColor, weight: FontWeight.w500), | ||||||
|  |         SizedBox(height: 20.h), | ||||||
|  |         Container( | ||||||
|  |           decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)), | ||||||
|  |           padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h), | ||||||
|  |           child: Column( | ||||||
|  |             children: [ | ||||||
|  |               CustomCountryDropdown( | ||||||
|  |                 countryList: CountryEnum.values, | ||||||
|  |                 onCountryChange: authVm.onCountryChange, | ||||||
|  |               ).paddingOnly(top: 8.h, bottom: 16.h), | ||||||
|  |               Divider(height: 1.h, color: AppColors.spacerLineColor), | ||||||
|  |               TextInputWidget( | ||||||
|  |                 labelText: LocaleKeys.nationalIdNumber.tr(), | ||||||
|  |                 hintText: "xxxxxxxxx", | ||||||
|  |                 controller: authVm.nationalIdController, | ||||||
|  |                 isEnable: true, | ||||||
|  |                 prefix: null, | ||||||
|  |                 isAllowRadius: true, | ||||||
|  |                 isBorderAllowed: false, | ||||||
|  |                 isAllowLeadingIcon: true, | ||||||
|  |                 autoFocus: true, | ||||||
|  |                 keyboardType: TextInputType.number, | ||||||
|  |                 padding: EdgeInsets.symmetric(vertical: 8.h), | ||||||
|  |                 leadingIcon: AppAssets.student_card, | ||||||
|  |               ).paddingOnly(top: 8.h, bottom: 8.h), | ||||||
|  |               Divider(height: 1.h, color: AppColors.spacerLineColor), | ||||||
|  |               TextInputWidget( | ||||||
|  |                 labelText: LocaleKeys.phoneNumber.tr(), | ||||||
|  |                 hintText: "", | ||||||
|  |                 controller: authVm.phoneNumberController, | ||||||
|  |                 isEnable: true, | ||||||
|  |                 prefix: authVm.selectedCountrySignup.countryCode, | ||||||
|  |                 isAllowRadius: true, | ||||||
|  |                 isBorderAllowed: false, | ||||||
|  |                 isAllowLeadingIcon: true, | ||||||
|  |                 autoFocus: true, | ||||||
|  |                 keyboardType: TextInputType.number, | ||||||
|  |                 padding: EdgeInsets.symmetric(vertical: 8.h), | ||||||
|  |                 leadingIcon: AppAssets.smart_phone, | ||||||
|  |               ).paddingOnly(top: 8.h, bottom: 4.h), | ||||||
|  |             ], | ||||||
|  |           ), | ||||||
|  |         ), | ||||||
|  |         SizedBox(height: 20.h), | ||||||
|  |         CustomButton( | ||||||
|  |             text: "Verify the member".needTranslation, | ||||||
|  |             onPressed: () { | ||||||
|  |               FocusScope.of(context).unfocus(); | ||||||
|  |               if (ValidationUtils.isValidatedIdAndPhoneWithCountryValidation( | ||||||
|  |                 nationalId: authVm.nationalIdController.text, | ||||||
|  |                 selectedCountry: authVm.selectedCountrySignup, | ||||||
|  |                 phoneNumber: authVm.phoneNumberController.text, | ||||||
|  |                 onOkPress: () { | ||||||
|  |                   Navigator.of(context).pop(); | ||||||
|  |                 }, | ||||||
|  |               )) { | ||||||
|  |                 // authVm.addFamilyMember(otpTypeEnum: OTPTypeEnum.sms, isExcludedUser: true); | ||||||
|  |                 if (onVerificationPress != null) { | ||||||
|  |                   onVerificationPress!(); | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             }, | ||||||
|  |             icon: AppAssets.add_icon, | ||||||
|  |             height: 56.h, | ||||||
|  |             fontWeight: FontWeight.w600), | ||||||
|  |         SizedBox(height: 20.h), | ||||||
|  |       ], | ||||||
|  |     ); | ||||||
|  |   } | ||||||
|  | } | ||||||
					Loading…
					
					
				
		Reference in New Issue