Er refferal Fix #310

Merged
Haroon6138 merged 1 commits from dev_aamir into master 1 day ago

@ -89,17 +89,13 @@ class PatientInformationStepState extends State<PatientInformationStep> {
}
Widget _buildSectionTitle(String title) {
return Text(
title,
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 16)
).paddingSymmetrical(4, 0);
return Text(title, style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 16)).paddingSymmetrical(4, 0);
}
Widget _buildIdentificationField(ReferralFormManager formManager) {
return Focus(
focusNode: _identificationFocusNode,
child: TextInputWidget(
return TextInputWidget(
controller: _identificationController,
focusNode: _identificationFocusNode,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(12).h,
horizontal: ResponsiveExtension(16).h,
@ -114,19 +110,14 @@ class PatientInformationStepState extends State<PatientInformationStep> {
onSubmitted: (value) {
_nameFocusNode.requestFocus();
},
).paddingSymmetrical(0, 4),
);
).paddingSymmetrical(0, 4);
}
Widget _buildPatientNameField(ReferralFormManager formManager) {
return Focus(
focusNode: _nameFocusNode,
child: TextInputWidget(
return TextInputWidget(
controller: _nameController,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(12).h,
horizontal: ResponsiveExtension(16).h,
),
focusNode: _nameFocusNode,
padding: EdgeInsets.symmetric(vertical: ResponsiveExtension(12).h, horizontal: ResponsiveExtension(16).h),
hintText: LocaleKeys.patientName.tr(context: context),
labelText: LocaleKeys.name.tr(context: context),
keyboardType: TextInputType.text,
@ -136,21 +127,19 @@ class PatientInformationStepState extends State<PatientInformationStep> {
formManager.updatePatientName(value ?? '');
},
onSubmitted: (value) {
// Optionally move to next field or keep focus
_phoneFocusNode.requestFocus();
},
).paddingSymmetrical(0, 4),
);
).paddingSymmetrical(0, 4);
}
Widget _buildPatientPhoneField(ReferralFormManager formManager) {
return Directionality(
textDirection: ui.TextDirection.ltr,
child: Focus(
focusNode: _phoneFocusNode,
child: TextInputWidget(
labelText: LocaleKeys.phoneNumber.tr(context: context),
hintText: "5xxxxxxxx",
controller: _phoneController,
focusNode: _phoneFocusNode,
padding: const EdgeInsets.all(8),
keyboardType: TextInputType.number,
fontFamily: "Poppins",
@ -167,9 +156,8 @@ class PatientInformationStepState extends State<PatientInformationStep> {
isCountryDropDown: true,
leadingIcon: AppAssets.smart_phone,
errorMessage: formManager.errors.patientPhone,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientPhone)
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientPhone),
).paddingSymmetrical(0, 8),
),
);
}
@ -191,13 +179,11 @@ class PatientInformationStepState extends State<PatientInformationStep> {
});
}
String? getLocaleDescription(GetAllCitiesResponseModel? patientCity){
return getIt.get<AppState>().isArabic() ? patientCity?.descriptionN: patientCity?.description;
String? getLocaleDescription(GetAllCitiesResponseModel? patientCity) {
return getIt.get<AppState>().isArabic() ? patientCity?.descriptionN : patientCity?.description;
}
void _showCityBottomSheet(BuildContext context, ReferralFormManager formManager) {
showCommonBottomSheetWithoutHeight(
context,
title: LocaleKeys.selectCity.tr(context: context),
@ -216,9 +202,9 @@ class PatientInformationStepState extends State<PatientInformationStep> {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
customBorder: BorderRadius.all(Radius.circular(24.h)) ,
), child: ListView.builder(
customBorder: BorderRadius.all(Radius.circular(24.h)),
),
child: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.all(16.h),
physics: const BouncingScrollPhysics(),

Loading…
Cancel
Save