|
|
|
|
@ -204,7 +204,7 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
),
|
|
|
|
|
if (isFormSubmitted &&
|
|
|
|
|
_selectedMedication == null)
|
|
|
|
|
CustomValidationError(),
|
|
|
|
|
Container(child: CustomValidationError()),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
@ -231,6 +231,7 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
.nameEn;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
@ -247,16 +248,14 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
minLines: 2,
|
|
|
|
|
isDropDown: true,
|
|
|
|
|
controller: doseController,
|
|
|
|
|
validationError:isFormSubmitted &&
|
|
|
|
|
_selectedMedicationDose == null?TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.emptyMessage:null,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
if (isFormSubmitted &&
|
|
|
|
|
_selectedMedicationDose == null)
|
|
|
|
|
CustomValidationError(),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
enabled: false,
|
|
|
|
|
isDropDown: true,
|
|
|
|
|
@ -296,13 +295,14 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
controller: strengthController,
|
|
|
|
|
validationError:isFormSubmitted &&
|
|
|
|
|
_selectedMedicationStrength == null?TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.emptyMessage:null,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
if (isFormSubmitted &&
|
|
|
|
|
_selectedMedicationStrength == null)
|
|
|
|
|
CustomValidationError(),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
@ -344,13 +344,14 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
controller: routeController,
|
|
|
|
|
validationError:isFormSubmitted &&
|
|
|
|
|
_selectedMedicationRoute == null?TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.emptyMessage:null,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
if (isFormSubmitted &&
|
|
|
|
|
_selectedMedicationRoute == null)
|
|
|
|
|
CustomValidationError(),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
@ -393,13 +394,14 @@ class _AddMedicationState extends State<AddMedication> {
|
|
|
|
|
minLines: 2,
|
|
|
|
|
isDropDown: true,
|
|
|
|
|
controller: frequencyController,
|
|
|
|
|
validationError:isFormSubmitted &&
|
|
|
|
|
_selectedMedicationFrequency == null?TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.emptyMessage:null,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
if (isFormSubmitted &&
|
|
|
|
|
_selectedMedicationFrequency == null)
|
|
|
|
|
CustomValidationError(),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
|