From eb0fda35551460638b380158717e723981a6081d Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 5 May 2021 12:17:21 +0300 Subject: [PATCH] hot fix --- .../prescription/add_prescription_form.dart | 33 ++++++------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index d372e548..fd7c09cf 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -385,8 +385,7 @@ class _PrescriptionFormWidgetState extends State { true; visbiltySearch = false; _selectedMedication = - model.allMedicationList[ - index]; + model.allMedicationList[index]; uom = _selectedMedication .uom; }, @@ -406,6 +405,8 @@ class _PrescriptionFormWidgetState extends State { child: Container( child: Column( children: [ + + AppText(_selectedMedication?.description??"",bold: true,), Container( child: Row( children: [ @@ -435,10 +436,7 @@ class _PrescriptionFormWidgetState extends State { child: Row( children: [ Container( - width: MediaQuery.of(context) - .size - .width * - 0.450, + width: MediaQuery.of(context).size.width * 0.35, child: TextFields( inputFormatters: [ LengthLimitingTextInputFormatter( @@ -447,9 +445,7 @@ class _PrescriptionFormWidgetState extends State { // .digitsOnly ], hintText: - TranslationBase.of( - context) - .strength, + TranslationBase.of(context).strength, controller: strengthController, keyboardType: TextInputType @@ -560,20 +556,11 @@ class _PrescriptionFormWidgetState extends State { : null, child: TextField( decoration: - textFieldSelectorDecoration( - 'Select', - model.itemMedicineListUnit - .length == - 1 - ? units = model - .itemMedicineListUnit[0] - [ - 'description'] - : units != - null - ? units[ - 'description'] - : null, + textFieldSelectorDecoration('Select', + + model.itemMedicineListUnit.length == 1 + ? units = model.itemMedicineListUnit[0]['description'] + : units != null ? units['description'].toString() : null, true), enabled: false), ),