From 6107f88c16df45085c0d4ad5003752ed011cd6a5 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Thu, 6 May 2021 13:37:30 +0300 Subject: [PATCH] prescription changes --- .../prescription/add_prescription_form.dart | 104 +++++------------- 1 file changed, 29 insertions(+), 75 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index cfb6263b..c295fd28 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -445,85 +445,39 @@ class _PrescriptionFormWidgetState extends State { child: Row( children: [ Container( - // height: MediaQuery.of(context) - // .size - // .height * - // 0.02, + color: Colors.white, width: MediaQuery.of(context) .size .width * 0.35, - child: AppTextFieldCustom( - isPrscription: true, - inputFormatters: [ - LengthLimitingTextInputFormatter( - 5), - // WhitelistingTextInputFormatter - // .digitsOnly - ], - hintText: - TranslationBase.of( - context) - .strength, - - // fontWeight: FontWeight.w500, - // fontSize: 14.0, - // borderWidth: 0.2, - - controller: - strengthController, - // keyboardType: TextInputType - // .numberWithOptions( - // decimal: true, - // ), - onChanged: (String value) { - setState(() { - strengthChar = - value.length; - }); - if (strengthChar >= 5) { - DrAppToastMsg - .showErrorToast( - TranslationBase.of( - context) - .only5DigitsAllowedForStrength, - ); - } - }, - // onClick: (_) { - // if (_selectedMedication != - // null && - // duration != null && - // frequency != null && - // strengthController - // .text != - // null) { - // model.getBoxQuantity( - // freq: frequency[ - // 'parameterCode'], - // duration: - // duration['id'], - // itemCode: - // _selectedMedication - // .itemId, - // strength: double.parse( - // strengthController - // .text)); - // box = model.boxQuintity; - // - // return; - // } - // }, - // validator: (value) { - // if (value.isEmpty && - // strengthController.text.length > - // 4) - // return TranslationBase.of(context) - // .emptyMessage; - // else - // return null; - // }, - ), + child: TextField( + decoration: + textFieldSelectorDecoration( + "", + 'Strength', //strengthController.text, + false), + enabled: true, + controller: + strengthController, + onChanged: + (String value) { + setState(() { + strengthChar = + value.length; + }); + if (strengthChar >= 5) { + DrAppToastMsg + .showErrorToast( + TranslationBase.of( + context) + .only5DigitsAllowedForStrength, + ); + } + }, + keyboardType: TextInputType + .numberWithOptions( + decimal: true, + )), ), SizedBox( width: 5.0,