From 39d2fe879c03140ceb3761e5a348e0764b8d72bc Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 14 Feb 2021 16:44:47 +0200 Subject: [PATCH 1/2] jira bug fixing --- .../prescription/prescription_screen.dart | 16 +- .../update_prescription_form.dart | 1129 +++++++++-------- 2 files changed, 581 insertions(+), 564 deletions(-) diff --git a/lib/screens/prescription/prescription_screen.dart b/lib/screens/prescription/prescription_screen.dart index 9cc208c5..f7012f1d 100644 --- a/lib/screens/prescription/prescription_screen.dart +++ b/lib/screens/prescription/prescription_screen.dart @@ -214,16 +214,16 @@ class _NewPrescriptionScreenState extends State { 0] .entityList[ index] - .startDate) + .createdOn) .day .toString(), color: Colors .green, ), AppText( - Helpers.getMonth(model.prescriptionList[0].entityList[index].startDate != + Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn != null - ? (DateTime.parse(model.prescriptionList[0].entityList[index].startDate) + ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) .month) : DateTime.now() .month) @@ -261,9 +261,13 @@ class _NewPrescriptionScreenState extends State { child: AppText( model - .prescriptionList[0] - .entityList[index] - .startDate, + .prescriptionList[ + 0] + .entityList[ + index] + .startDate + .replaceAll("-", + "/"), fontSize: 12.0, ), diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart index af1fbb07..6efc5900 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -79,7 +79,7 @@ class _UpdatePrescriptionFormState extends State { @override void initState() { super.initState(); - + remarksController.text = widget.remarks; indicationList = List(); dynamic indication1 = {"id": 545, "name": "Gingival Hyperplasia"}; @@ -146,586 +146,599 @@ class _UpdatePrescriptionFormState extends State { minChildSize: 0.6, builder: (BuildContext context, ScrollController scrollController) { - return Container( - height: MediaQuery.of(context).size.height * 2.5, - child: Form( - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: 20.0, vertical: 12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - widget.drugName.toUpperCase(), - fontWeight: FontWeight.w900, - ), - SizedBox( - height: 10.0, - ), - Column( - children: [ - // Container( - // height: MediaQuery.of(context).size.height * - // 0.070, - // child: InkWell( - // onTap: model.allMedicationList != null - // ? () { - // setState(() { - // newSelectedMedication = null; - // }); - // } - // : null, - // child: newSelectedMedication == null - // ? AutoCompleteTextField< - // GetMedicationResponseModel>( - // decoration: - // textFieldSelectorDecoration( - // widget.drugNameGeneric, - // newSelectedMedication != null - // ? newSelectedMedication - // .genericName - // : null, - // true, - // ), - // itemSubmitted: (item) => setState( - // () => newSelectedMedication = - // item), - // key: key, - // suggestions: - // model.allMedicationList, - // itemBuilder: (context, - // suggestion) => - // new Padding( - // child: Texts(suggestion - // .description + - // '/' + - // suggestion.genericName), - // padding: - // EdgeInsets.all(8.0)), - // itemSorter: (a, b) => 1, - // itemFilter: (suggestion, input) => - // suggestion.genericName - // .toLowerCase() - // .startsWith( - // input.toLowerCase()) || - // suggestion.description - // .toLowerCase() - // .startsWith( - // input.toLowerCase()) || - // suggestion.keywords - // .toLowerCase() - // .startsWith( - // input.toLowerCase()), - // ) - // : TextField( - // decoration: - // textFieldSelectorDecoration( - // TranslationBase.of(context) - // .searchMedicineNameHere, - // newSelectedMedication != null - // ? newSelectedMedication - // .description + - // ('${newSelectedMedication.genericName}') - // : null, - // true, - // ), - // enabled: false, - // ), - // ), - // ), - // SizedBox( - // height: 12, - // ), - Container( - height: MediaQuery.of(context).size.height * - 0.060, - width: double.infinity, - child: Row( - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.4900, - height: MediaQuery.of(context) - .size - .height * - 0.55, - child: TextFields( - inputFormatters: [ - LengthLimitingTextInputFormatter( - 4), - WhitelistingTextInputFormatter - .digitsOnly - ], - hintText: widget.doseStreangth, - fontSize: 15.0, - controller: strengthController, - keyboardType: TextInputType.number, - onChanged: (String value) { - setState(() { - strengthChar = value.length; - }); - if (strengthChar >= 4) { - DrAppToastMsg.showErrorToast( - "Only 4 Digits allowed for strength"); - } - }, - // validator: (value) { - // if (value.isEmpty && - // strengthController.text.length > - // 4) - // return TranslationBase.of(context) - // .emptyMessage; - // else - // return null; - // }, + return SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 2.0, + child: Form( + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: 20.0, vertical: 12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + widget.drugName.toUpperCase(), + fontWeight: FontWeight.w900, + ), + SizedBox( + height: 10.0, + ), + Column( + children: [ + // Container( + // height: MediaQuery.of(context).size.height * + // 0.070, + // child: InkWell( + // onTap: model.allMedicationList != null + // ? () { + // setState(() { + // newSelectedMedication = null; + // }); + // } + // : null, + // child: newSelectedMedication == null + // ? AutoCompleteTextField< + // GetMedicationResponseModel>( + // decoration: + // textFieldSelectorDecoration( + // widget.drugNameGeneric, + // newSelectedMedication != null + // ? newSelectedMedication + // .genericName + // : null, + // true, + // ), + // itemSubmitted: (item) => setState( + // () => newSelectedMedication = + // item), + // key: key, + // suggestions: + // model.allMedicationList, + // itemBuilder: (context, + // suggestion) => + // new Padding( + // child: Texts(suggestion + // .description + + // '/' + + // suggestion.genericName), + // padding: + // EdgeInsets.all(8.0)), + // itemSorter: (a, b) => 1, + // itemFilter: (suggestion, input) => + // suggestion.genericName + // .toLowerCase() + // .startsWith( + // input.toLowerCase()) || + // suggestion.description + // .toLowerCase() + // .startsWith( + // input.toLowerCase()) || + // suggestion.keywords + // .toLowerCase() + // .startsWith( + // input.toLowerCase()), + // ) + // : TextField( + // decoration: + // textFieldSelectorDecoration( + // TranslationBase.of(context) + // .searchMedicineNameHere, + // newSelectedMedication != null + // ? newSelectedMedication + // .description + + // ('${newSelectedMedication.genericName}') + // : null, + // true, + // ), + // enabled: false, + // ), + // ), + // ), + // SizedBox( + // height: 12, + // ), + Container( + height: + MediaQuery.of(context).size.height * + 0.060, + width: double.infinity, + child: Row( + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.4900, + height: MediaQuery.of(context) + .size + .height * + 0.55, + child: TextFields( + inputFormatters: [ + LengthLimitingTextInputFormatter( + 4), + WhitelistingTextInputFormatter + .digitsOnly + ], + hintText: widget.doseStreangth, + fontSize: 15.0, + controller: strengthController, + keyboardType: + TextInputType.number, + onChanged: (String value) { + setState(() { + strengthChar = value.length; + }); + if (strengthChar >= 4) { + DrAppToastMsg.showErrorToast( + "Only 4 Digits allowed for strength"); + } + }, + // validator: (value) { + // if (value.isEmpty && + // strengthController.text.length > + // 4) + // return TranslationBase.of(context) + // .emptyMessage; + // else + // return null; + // }, + ), ), - ), - SizedBox( - width: 10.0, - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.3700, - child: InkWell( - onTap: - model.medicationStrengthList != - null - ? () { - Helpers.hideKeyboard( - context); - ListSelectDialog - dialog = - ListSelectDialog( - list: model - .medicationStrengthList, - attributeName: - 'nameEn', - attributeValueId: - 'id', - okText: - TranslationBase.of( - context) - .ok, - okFunction: - (selectedValue) { - setState(() { - units = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: - false, - context: context, - builder: (BuildContext - context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - 'UNIT Type', - units != null - ? units['nameEn'] - : null, - true), - enabled: false, + SizedBox( + width: 10.0, + ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.3700, + child: InkWell( + onTap: + model.medicationStrengthList != + null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .medicationStrengthList, + attributeName: + 'nameEn', + attributeValueId: + 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + units = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + 'UNIT Type', + units != null + ? units['nameEn'] + : null, + true), + enabled: false, + ), ), ), - ), - ], + ], + ), ), - ), - SizedBox( - height: 12, - ), - Container( - height: MediaQuery.of(context).size.height * - 0.070, - child: InkWell( - onTap: model.medicationRouteList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.medicationRouteList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - route = selectedValue; - }); - if (route == null) { - route = route['id']; - } - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - 'Route', - route != null - ? route['nameEn'] - : null, - true), - enabled: false, + SizedBox( + height: 12, + ), + Container( + height: + MediaQuery.of(context).size.height * + 0.070, + child: InkWell( + onTap: model.medicationRouteList != null + ? () { + Helpers.hideKeyboard(context); + ListSelectDialog dialog = + ListSelectDialog( + list: + model.medicationRouteList, + attributeName: 'nameEn', + attributeValueId: 'id', + okText: TranslationBase.of( + context) + .ok, + okFunction: (selectedValue) { + setState(() { + route = selectedValue; + }); + if (route == null) { + route = route['id']; + } + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: + (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + 'Route', + route != null + ? route['nameEn'] + : null, + true), + enabled: false, + ), ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: MediaQuery.of(context).size.height * - 0.070, - child: InkWell( - onTap: model.medicationDoseTimeList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationDoseTimeList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - doseTime = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .doseTime, - doseTime != null - ? doseTime['nameEn'] - : null, - true), - enabled: false, + SizedBox( + height: 12.0, + ), + Container( + height: + MediaQuery.of(context).size.height * + 0.070, + child: InkWell( + onTap: model.medicationDoseTimeList != + null + ? () { + Helpers.hideKeyboard(context); + ListSelectDialog dialog = + ListSelectDialog( + list: model + .medicationDoseTimeList, + attributeName: 'nameEn', + attributeValueId: 'id', + okText: TranslationBase.of( + context) + .ok, + okFunction: (selectedValue) { + setState(() { + doseTime = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: + (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of(context) + .doseTime, + doseTime != null + ? doseTime['nameEn'] + : null, + true), + enabled: false, + ), ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: MediaQuery.of(context).size.height * - 0.070, - child: InkWell( - onTap: model.medicationFrequencyList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationFrequencyList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - frequencyUpdate = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .frequency, - frequencyUpdate != null - ? frequencyUpdate['nameEn'] - : null, - true), - enabled: false, + SizedBox( + height: 12.0, + ), + Container( + height: + MediaQuery.of(context).size.height * + 0.070, + child: InkWell( + onTap: model.medicationFrequencyList != + null + ? () { + Helpers.hideKeyboard(context); + ListSelectDialog dialog = + ListSelectDialog( + list: model + .medicationFrequencyList, + attributeName: 'nameEn', + attributeValueId: 'id', + okText: TranslationBase.of( + context) + .ok, + okFunction: (selectedValue) { + setState(() { + frequencyUpdate = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: + (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of(context) + .frequency, + frequencyUpdate != null + ? frequencyUpdate[ + 'nameEn'] + : null, + true), + enabled: false, + ), ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: MediaQuery.of(context).size.height * - 0.070, - child: InkWell( - onTap: model.medicationDurationList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationDurationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - updatedDuration = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .duration, - updatedDuration != null - ? updatedDuration['nameEn'] - .toString() - : null, - true), - enabled: false, + SizedBox( + height: 12.0, + ), + Container( + height: + MediaQuery.of(context).size.height * + 0.070, + child: InkWell( + onTap: model.medicationDurationList != + null + ? () { + Helpers.hideKeyboard(context); + ListSelectDialog dialog = + ListSelectDialog( + list: model + .medicationDurationList, + attributeName: 'nameEn', + attributeValueId: 'id', + okText: TranslationBase.of( + context) + .ok, + okFunction: (selectedValue) { + setState(() { + updatedDuration = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: + (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of(context) + .duration, + updatedDuration != null + ? updatedDuration[ + 'nameEn'] + .toString() + : null, + true), + enabled: false, + ), ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: screenSize.height * 0.070, - width: double.infinity, - child: Row( - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.29, - child: InkWell( - onTap: indicationList != null - ? () { - Helpers.hideKeyboard( - context); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString(), - indication != null - ? indication['name'] - : null, - true), - enabled: true, - readOnly: true, + SizedBox( + height: 12.0, + ), + Container( + height: screenSize.height * 0.070, + width: double.infinity, + child: Row( + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.29, + child: InkWell( + onTap: indicationList != null + ? () { + Helpers.hideKeyboard( + context); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .icdCode10ID + .toString(), + indication != null + ? indication['name'] + : null, + true), + enabled: true, + readOnly: true, + ), ), ), - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.61, - child: InkWell( - onTap: indicationList != null - ? () { - Helpers.hideKeyboard( - context); - } - : null, - child: TextField( - maxLines: 3, - decoration: - textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .asciiDesc - .toString(), - indication != null - ? indication['name'] - : null, - true), - enabled: true, - readOnly: true, + Container( + width: MediaQuery.of(context) + .size + .width * + 0.61, + child: InkWell( + onTap: indicationList != null + ? () { + Helpers.hideKeyboard( + context); + } + : null, + child: TextField( + maxLines: 3, + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .asciiDesc + .toString(), + indication != null + ? indication['name'] + : null, + true), + enabled: true, + readOnly: true, + ), ), ), + ], + ), + ), + SizedBox( + height: 12.0, + ), + Container( + height: screenSize.height * 0.070, + child: InkWell( + onTap: () => + selectDate(context, widget.model), + child: TextField( + decoration: Helpers + .textFieldSelectorDecoration( + widget.startDate, + selectedDate != null + ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" + : null, + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, ), - ], + ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: () => - selectDate(context, widget.model), - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - widget.startDate, - selectedDate != null - ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, + SizedBox( + height: 12.0, + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"))), + child: TextFields( + controller: remarksController, + maxLines: 7, + minLines: 4, ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: widget.remarks, - controller: remarksController, - maxLines: 7, - minLines: 4, + SizedBox( + height: 10.0, ), - ), - SizedBox( - height: 10.0, - ), - SizedBox( - height: MediaQuery.of(context).size.height * - 0.08, - ), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 2), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: 'update prescription' - .toUpperCase(), - onPressed: () { - updatePrescription( - newStartDate: selectedDate, - newDoseStreangth: - strengthController - .text.isNotEmpty - ? strengthController - .text - : widget.doseStreangth, - newUnit: - units != - null - ? units['id'].toString() - : widget.doseUnit, - doseUnit: widget.doseUnit, - doseStreangth: widget - .doseStreangth, - duration: widget.duration, - startDate: widget.startDate, - doseId: widget.dose, - frequencyId: widget.frequency, - routeId: widget.route, - patient: widget.patient, - model: widget.model, - newDuration: - updatedDuration != - null - ? updatedDuration[ - 'id'] - .toString() - : widget.duration, - drugId: widget.drugId, - remarks: remarksController.text, - route: route != - null - ? route['id'].toString() - : widget.route, - frequency: - frequencyUpdate != - null - ? frequencyUpdate['id'] - .toString() - : widget.frequency, - dose: doseTime != null - ? doseTime['id'].toString() - : widget.dose, - enteredRemarks: - widget.enteredRemarks); - Navigator.pop(context); - }, - ), - ], + SizedBox( + height: + MediaQuery.of(context).size.height * + 0.08, + ), + Container( + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 2), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: 'update prescription' + .toUpperCase(), + onPressed: () { + updatePrescription( + newStartDate: selectedDate, + newDoseStreangth: + strengthController + .text.isNotEmpty + ? strengthController + .text + : widget + .doseStreangth, + newUnit: units != null + ? units['id'].toString() + : widget.doseUnit, + doseUnit: widget.doseUnit, + doseStreangth: + widget.doseStreangth, + duration: widget.duration, + startDate: widget.startDate, + doseId: widget.dose, + frequencyId: widget.frequency, + routeId: widget.route, + patient: widget.patient, + model: widget.model, + newDuration: updatedDuration != + null + ? updatedDuration['id'] + .toString() + : widget.duration, + drugId: widget.drugId, + remarks: + remarksController.text, + route: route != null + ? route['id'].toString() + : widget.route, + frequency: frequencyUpdate != + null + ? frequencyUpdate['id'] + .toString() + : widget.frequency, + dose: doseTime != null + ? doseTime['id'] + .toString() + : widget.dose, + enteredRemarks: + widget.enteredRemarks); + Navigator.pop(context); + }, + ), + ], + ), ), - ), - ], - ), - ], + ], + ), + ], + ), ), - ), - )); + )), + ); }), ), ), From cb8b7a4ec4134171c8c225f2ab5fc76a7ade7500 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 14 Feb 2021 16:46:56 +0200 Subject: [PATCH 2/2] jira bug fixing --- .../update_prescription_form.dart | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart index 70ff06c2..6086c278 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -577,11 +577,14 @@ class _UpdatePrescriptionFormState extends State { child: TextField( decoration: textFieldSelectorDecoration( - model - .patientAssessmentList.isNotEmpty? model.patientAssessmentList[ - 0] - .icdCode10ID - .toString():'', + model.patientAssessmentList + .isNotEmpty + ? model + .patientAssessmentList[ + 0] + .icdCode10ID + .toString() + : '', indication != null ? indication['name'] : null, @@ -607,11 +610,14 @@ class _UpdatePrescriptionFormState extends State { maxLines: 3, decoration: textFieldSelectorDecoration( - model - .patientAssessmentList.isNotEmpty? model.patientAssessmentList[ - 0] - .asciiDesc - .toString():'', + model.patientAssessmentList + .isNotEmpty + ? model + .patientAssessmentList[ + 0] + .asciiDesc + .toString() + : '', indication != null ? indication['name'] : null,