diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index f199776b..6859ab23 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1,4 +1,4 @@ -const Map> localizedValues = { +const Map> localizedValues = { 'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'}, 'settings': {'en': 'Settings', 'ar': 'الاعدادات'}, 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, @@ -202,7 +202,10 @@ const Map> localizedValues = { 'routine': {'en': 'Routine', 'ar': 'روتيني'}, 'send': {'en': 'Send', 'ar': 'ارسال'}, 'referralFrequency': {'en': 'Referral Frequency:', 'ar': 'تواتر الحالة:'}, - 'selectReferralFrequency': {'en': 'Select Referral Frequency:', 'ar': 'اختار تواتر الحالة:'}, + 'selectReferralFrequency': { + 'en': 'Select Referral Frequency:', + 'ar': 'اختار تواتر الحالة:' + }, 'clinicalDetailsAndRemarks': { 'en': 'Clinical Details and Remarks', 'ar': 'التفاصيل السرسرية والملاحظات' @@ -258,7 +261,6 @@ const Map> localizedValues = { 'ar': 'لا يوجد اي نتائج' }, 'typeMedicineName': {'en': 'Type Medicine Name', 'ar': 'اكتب اسم الدواء'}, - 'moreThan3Letter': { 'en': 'Medicine Name Should Be More Than 3 letter', 'ar': 'يجب أن يكون اسم الدواء أكثر من 3 أحرف' @@ -274,13 +276,13 @@ const Map> localizedValues = { 'room': {'en': 'ROOM:', 'ar': 'الغرفة'}, 'bed': {'en': 'BED:', 'ar': 'السرير'}, 'next': {'en': 'Next', 'ar': 'التالي'}, - 'healthRecordInformation': {'en': 'HEALTH RECORD INFORMATION', 'ar': 'معلومات السجل الصحي'}, + 'healthRecordInformation': { + 'en': 'HEALTH RECORD INFORMATION', + 'ar': 'معلومات السجل الصحي' + }, 'clinicSelect': {'en': "Select Clinic", 'ar': 'اختار عيادة'}, 'doctorSelect': {'en': "Select Doctor", 'ar': 'اختار طبيب'}, - "empty-message": { - "en": "Please enter message", - "ar": "يرجى ادخال الموضوع" - }, + "empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الموضوع"}, 'referTo': {'en': "Refer To", 'ar': 'محال إلى'}, 'referredFrom': {'en': "Referred From", 'ar': 'محال من'}, 'branch': {'en': "Branch", 'ar': 'الفرع'}, @@ -296,7 +298,10 @@ const Map> localizedValues = { 'summaryReport': {'en': "Summary Report", 'ar': 'تقرير موجز'}, 'accept': {'en': "ACCEPT", 'ar': 'قبول'}, 'reject': {'en': "REJECT", 'ar': 'رفض'}, - 'noAppointmentsErrorMsg': {'en': "There is no appointments for at this date", 'ar': 'لا توجد مواعيد في هذا التاريخ'}, + 'noAppointmentsErrorMsg': { + 'en': "There is no appointments for at this date", + 'ar': 'لا توجد مواعيد في هذا التاريخ' + }, 'referralPatient': {'en': 'Referral Patient', 'ar': 'المريض المحال '}, 'noPrescriptionListed': { 'en': 'NO PRESCRIPTION LISTED', diff --git a/lib/routes.dart b/lib/routes.dart index 680c8cfc..e73d53b4 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -76,7 +76,7 @@ const String PATIENT_ORDERS = 'patients/patient_orders'; const String PATIENT_INSURANCE_APPROVALS = 'patients/patient_insurance_approvals'; const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details'; -const String CREATE_EPISODE = 'patients/create-episode'; +const String CREATE_EPISODE = 'patients/create-episode'; const String BODY_MEASUREMENTS = 'patients/body-measurements'; const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details'; @@ -117,7 +117,7 @@ var routes = { PATIENT_ORDERS: (_) => PatientsOrdersScreen(), PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), - CREATE_EPISODE:(_)=>AddSOAPIndex(), + CREATE_EPISODE: (_) => AddSOAPIndex(), BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen(), IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(), // VIDEO_CALL: (_) => VideoCallPage(patientData: null), diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index f3bee55e..a686e60d 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -33,7 +33,8 @@ class TranslationBase { String get mobileNo => localizedValues['mobileNo'][locale.languageCode]; - String get replySuccessfully => localizedValues['replySuccessfully'][locale.languageCode]; + String get replySuccessfully => + localizedValues['replySuccessfully'][locale.languageCode]; String get messagesScreenToolbarTitle => localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; @@ -79,8 +80,10 @@ class TranslationBase { localizedValues['patientServices'][locale.languageCode]; String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; - String get myReferralPatient => localizedValues['myReferralPatient'][locale.languageCode]; - String get referPatient => localizedValues['referPatient'][locale.languageCode]; + String get myReferralPatient => + localizedValues['myReferralPatient'][locale.languageCode]; + String get referPatient => + localizedValues['referPatient'][locale.languageCode]; String get myReferral => localizedValues['myReferral'][locale.languageCode]; String get myReferredPatient => localizedValues['myReferredPatient'][locale.languageCode]; @@ -107,8 +110,10 @@ class TranslationBase { String get profile => localizedValues['profile'][locale.languageCode]; String get gender => localizedValues['gender'][locale.languageCode]; String get clinic => localizedValues['clinic'][locale.languageCode]; - String get clinicSelect => localizedValues['clinicSelect'][locale.languageCode]; - String get doctorSelect => localizedValues['doctorSelect'][locale.languageCode]; + String get clinicSelect => + localizedValues['clinicSelect'][locale.languageCode]; + String get doctorSelect => + localizedValues['doctorSelect'][locale.languageCode]; String get hospital => localizedValues['hospital'][locale.languageCode]; String get speciality => localizedValues['speciality'][locale.languageCode]; String get errorMessage => @@ -122,8 +127,10 @@ class TranslationBase { String get lab => localizedValues['lab'][locale.languageCode]; String get result => localizedValues['result'][locale.languageCode]; String get medicines => localizedValues['medicines'][locale.languageCode]; - String get prescription => localizedValues['prescription'][locale.languageCode]; - String get insuranceApprovals => localizedValues['insuranceApprovals'][locale.languageCode]; + String get prescription => + localizedValues['prescription'][locale.languageCode]; + String get insuranceApprovals => + localizedValues['insuranceApprovals'][locale.languageCode]; String get insurance => localizedValues['insurance'][locale.languageCode]; String get approvals => localizedValues['approvals'][locale.languageCode]; String get bodyMeasurements => @@ -145,7 +152,8 @@ class TranslationBase { String get pleaseEnterAnswer => localizedValues['pleaseEnterAnswer'][locale.languageCode]; String get replay => localizedValues['replay'][locale.languageCode]; - String get progressNote => localizedValues['progressNote'][locale.languageCode]; + String get progressNote => + localizedValues['progressNote'][locale.languageCode]; String get progress => localizedValues['progress'][locale.languageCode]; String get note => localizedValues['note'][locale.languageCode]; String get searchNote => localizedValues['searchNote'][locale.languageCode]; @@ -223,8 +231,10 @@ class TranslationBase { String get urgent => localizedValues['urgent'][locale.languageCode]; String get routine => localizedValues['routine'][locale.languageCode]; String get send => localizedValues['send'][locale.languageCode]; - String get referralFrequency => localizedValues['referralFrequency'][locale.languageCode]; - String get selectReferralFrequency => localizedValues['selectReferralFrequency'][locale.languageCode]; + String get referralFrequency => + localizedValues['referralFrequency'][locale.languageCode]; + String get selectReferralFrequency => + localizedValues['selectReferralFrequency'][locale.languageCode]; String get clinicalDetailsAndRemarks => localizedValues['clinicalDetailsAndRemarks'][locale.languageCode]; String get remarks => localizedValues['remarks'][locale.languageCode]; @@ -291,7 +301,8 @@ class TranslationBase { localizedValues['moreThan3Letter'][locale.languageCode]; String get gender2 => localizedValues['gender2'][locale.languageCode]; String get age2 => localizedValues['age2'][locale.languageCode]; - String get admissionDetail => localizedValues['admissionDetail'][locale.languageCode]; + String get admissionDetail => + localizedValues['admissionDetail'][locale.languageCode]; String get dateTime => localizedValues['dateTime'][locale.languageCode]; String get admissionNo => localizedValues['admissionNo'][locale.languageCode]; String get losNo => localizedValues['losNo'][locale.languageCode]; @@ -299,25 +310,33 @@ class TranslationBase { String get room => localizedValues['room'][locale.languageCode]; String get bed => localizedValues['bed'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode]; - String get healthRecordInformation => localizedValues['healthRecordInformation'][locale.languageCode]; - String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; + String get healthRecordInformation => + localizedValues['healthRecordInformation'][locale.languageCode]; + String get emptyMessage => + localizedValues['empty-message'][locale.languageCode]; String get referTo => localizedValues['referTo'][locale.languageCode]; - String get referredFrom => localizedValues['referredFrom'][locale.languageCode]; + String get referredFrom => + localizedValues['referredFrom'][locale.languageCode]; String get branch => localizedValues['branch'][locale.languageCode]; - String get chooseAppointment => localizedValues['chooseAppointment'][locale.languageCode]; - String get appointmentNo => localizedValues['appointmentNo'][locale.languageCode]; + String get chooseAppointment => + localizedValues['chooseAppointment'][locale.languageCode]; + String get appointmentNo => + localizedValues['appointmentNo'][locale.languageCode]; String get refer => localizedValues['refer'][locale.languageCode]; String get approved => localizedValues['approved'][locale.languageCode]; String get rejected => localizedValues['rejected'][locale.languageCode]; String get sameBranch => localizedValues['sameBranch'][locale.languageCode]; String get otherBranch => localizedValues['otherBranch'][locale.languageCode]; String get dr => localizedValues['dr'][locale.languageCode]; - String get previewHealth => localizedValues['previewHealth'][locale.languageCode]; - String get summaryReport => localizedValues['summaryReport'][locale.languageCode]; + String get previewHealth => + localizedValues['previewHealth'][locale.languageCode]; + String get summaryReport => + localizedValues['summaryReport'][locale.languageCode]; String get accept => localizedValues['accept'][locale.languageCode]; String get reject => localizedValues['reject'][locale.languageCode]; - String get noAppointmentsErrorMsg => localizedValues['noAppointmentsErrorMsg'][locale.languageCode]; + String get noAppointmentsErrorMsg => + localizedValues['noAppointmentsErrorMsg'][locale.languageCode]; String get referralPatient => localizedValues['referralPatient'][locale.languageCode]; String get noPrescriptionListed => diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 3008bf73..e6d3bdbd 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -11,9 +11,9 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'PatientProfileButton.dart'; /* - *@author: Elham Rababah - *@Date:22/4/2020 - *@param: + *@author: Elham Rababah + *@Date:22/4/2020 + *@param: *@return:ProfileMedicalInfoWidget *@desc: Profile Medical Info Widget */ @@ -27,13 +27,14 @@ class ProfileMedicalInfoWidget extends StatelessWidget { mainAxisSpacing: 20, crossAxisCount: 2, childAspectRatio: 1.5, - children: [ PatientProfileButton( - key: key, - patient: patient, - nameLine1: "Create New", - nameLine2: "Episode", - route: CREATE_EPISODE, - icon: 'heartbeat.png'), + children: [ + PatientProfileButton( + key: key, + patient: patient, + nameLine1: "Create New", + nameLine2: "Episode", + route: CREATE_EPISODE, + icon: 'heartbeat.png'), PatientProfileButton( key: key, patient: patient, diff --git a/lib/widgets/shared/TextFields.dart b/lib/widgets/shared/TextFields.dart index 0e6f6c2b..791da173 100644 --- a/lib/widgets/shared/TextFields.dart +++ b/lib/widgets/shared/TextFields.dart @@ -39,10 +39,6 @@ class NumberTextInputFormatter extends TextInputFormatter { final _mobileFormatter = NumberTextInputFormatter(); class TextFields extends StatefulWidget { - - TextFields({Key key, this.type, this.hintText, this.suffixIcon, this.autoFocus, this.onChanged, this.initialValue, this.minLines, this.maxLines, this.inputFormatters, this.padding, this.focus=false, this.maxLengthEnforced=true, - this.suffixIconColor, this.inputAction, this.onSubmit, this.keepPadding=true, this.textCapitalization = TextCapitalization.none, this.onTap, this.controller, this.keyboardType, this.validator, this.borderOnlyError=false, - this.onSaved, this.onSuffixTap, this.readOnly: false, this.maxLength, this.prefixIcon, this.bare=false, this.fontSize=16.0, this.fontWeight=FontWeight.w700, this.autoValidate=false, this.onTapTextFields}) : super(key: key); TextFields( {Key key, this.type, @@ -77,7 +73,8 @@ class TextFields extends StatefulWidget { this.fontWeight = FontWeight.w700, this.autoValidate = false, this.fillColor, - this.hintColor}) + this.hintColor, + this.onTapTextFields}) : super(key: key); final String hintText; @@ -86,7 +83,7 @@ class TextFields extends StatefulWidget { final bool autoFocus; final IconData suffixIcon; final Color suffixIconColor; - final IconData prefixIcon; + final Icon prefixIcon; final VoidCallback onTap; final Function onTapTextFields; final TextEditingController controller; @@ -136,8 +133,7 @@ class _TextFieldsState extends State { @override void didUpdateWidget(TextFields oldWidget) { - if (widget.focus) - _focusNode.requestFocus(); + if (widget.focus) _focusNode.requestFocus(); super.didUpdateWidget(oldWidget); } @@ -178,15 +174,21 @@ class _TextFieldsState extends State { ), ); default: - if (widget.suffixIcon!=null) - return InkWell(onTap: widget.onSuffixTap, child: Icon(widget.suffixIcon, size: 22.0, color: widget.suffixIconColor!=null ? widget.suffixIconColor : Colors.grey[500])); + if (widget.suffixIcon != null) + return InkWell( + onTap: widget.onSuffixTap, + child: Icon(widget.suffixIcon, + size: 22.0, + color: widget.suffixIconColor != null + ? widget.suffixIconColor + : Colors.grey[500])); else return null; } } bool _determineReadOnly() { - if (widget.readOnly!=null && widget.readOnly) { + if (widget.readOnly != null && widget.readOnly) { _focusNode.unfocus(); return true; } else { @@ -211,7 +213,8 @@ class _TextFieldsState extends State { blurRadius: focus ? 34.0 : 12.0) ]), child: TextFormField( - onTap: widget.onTapTextFields,keyboardAppearance: Theme.of(context).brightness, + onTap: widget.onTapTextFields, + keyboardAppearance: Theme.of(context).brightness, scrollPhysics: BouncingScrollPhysics(), autovalidate: widget.autoValidate, textCapitalization: widget.textCapitalization, diff --git a/lib/widgets/shared/app_text_form_field.dart b/lib/widgets/shared/app_text_form_field.dart index ed3092fa..6c6d3ecc 100644 --- a/lib/widgets/shared/app_text_form_field.dart +++ b/lib/widgets/shared/app_text_form_field.dart @@ -41,7 +41,8 @@ class AppTextFormField extends FormField { focusNode: focusNode, keyboardType: textInputType, inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp(inputFormatter)), + FilteringTextInputFormatter.allow( + RegExp(inputFormatter)), ], onChanged: onChanged ?? (value) {