family screen & widgets
							parent
							
								
									e5488299b8
								
							
						
					
					
						commit
						d918b6e464
					
				| @ -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,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