|
|
|
|
@ -41,7 +41,7 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
TextEditingController strengthController = TextEditingController();
|
|
|
|
|
TextEditingController routeController = TextEditingController();
|
|
|
|
|
TextEditingController frequencyController = TextEditingController();
|
|
|
|
|
late GetMedicationResponseModel _selectedMedication;
|
|
|
|
|
GetMedicationResponseModel? _selectedMedication;
|
|
|
|
|
|
|
|
|
|
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<GetMedicationResponseModel>>();
|
|
|
|
|
bool isFormSubmitted = false;
|
|
|
|
|
@ -127,8 +127,8 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
)
|
|
|
|
|
: AppTextFieldCustom(
|
|
|
|
|
hintText: _selectedMedication != null
|
|
|
|
|
? _selectedMedication.description! +
|
|
|
|
|
(' (${_selectedMedication.genericName} )')
|
|
|
|
|
? _selectedMedication!.description! +
|
|
|
|
|
(' (${_selectedMedication!.genericName} )')
|
|
|
|
|
: TranslationBase.of(context).searchMedicineNameHere,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
@ -346,7 +346,7 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
_selectedMedicationRoute != null &&
|
|
|
|
|
_selectedMedicationFrequency != null) {
|
|
|
|
|
widget.medicationController.text = widget.medicationController.text +
|
|
|
|
|
'${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n';
|
|
|
|
|
'${_selectedMedication!.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n';
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|