first step from change text fields

merge-requests/521/head
Elham Rababah 5 years ago
parent fac8473f59
commit 59ec9d8e56

@ -112,7 +112,7 @@ class PrescriptionService extends LookupService {
}, body: _drugRequestModel.toJson());
}
Future getMedicationList({String drug}) async {
Future getMedicationList({String drug =''}) async {
hasError = false;
_drugRequestModel.search = ["$drug"];
await baseAppClient.post(SEARCH_DRUG,

@ -220,6 +220,12 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
maxLines: 2,
minLines: 1,
controller: icdNameController,
// hasBorder: true,
// validationError: isFormSubmitted &&
// widget.mySelectedAssessment
// .selectedICD == null?TranslationBase
// .of(context)
// .emptyMessage:null,
enabled: true,
)
@ -273,12 +279,14 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
controller: conditionController,
isDropDown: true,
enabled: false,
hasBorder: true,
validationError: isFormSubmitted &&
widget.mySelectedAssessment
.selectedDiagnosisCondition == null?TranslationBase
.of(context)
.emptyMessage:null,
),
if (isFormSubmitted &&
widget.mySelectedAssessment
.selectedDiagnosisCondition ==
null)
CustomValidationError(),
SizedBox(
height: 10,
),
@ -317,38 +325,28 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
enabled: false,
isDropDown: true,
controller: typeController,
hasBorder: true,
validationError: isFormSubmitted &&
widget.mySelectedAssessment
.selectedDiagnosisType == null?TranslationBase
.of(context)
.emptyMessage:null,
),
if (isFormSubmitted &&
widget.mySelectedAssessment
.selectedDiagnosisType ==
null)
CustomValidationError(),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: TextFields(
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).remarks,
fontSize: 13.5,
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 5,
hasLabelText:
remarkController.text != '' ? true : false,
showLabelText: true,
controller: remarkController,
onChanged: (value) {
widget.mySelectedAssessment.remark =
remarkController.text;
},
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
),
SizedBox(
height: 10,

@ -131,9 +131,14 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
}).toList(),
)
],
),
isExpanded: isSysExaminationExpand,
),
SizedBox(height: MediaQuery
.of(context)
.size
.height * 0.12,)
],
),
),

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -35,33 +36,28 @@ class UpdateChiefComplaints extends StatelessWidget {
height: 20,
),
//TODO handel error cases
NewTextFields(
AppTextFieldCustom(
hintText: TranslationBase.of(context).addChiefComplaints,
controller: complaintsController,
maxLines: 25,
minLines: 3,
),
minLines: 7,
hasBorder: true,
validationError:complaintsController.text.isEmpty && complaintsControllerError !=''?complaintsControllerError:null ,
Container(
child: CustomValidationError(
error: complaintsControllerError,
)),
),
SizedBox(
height: 20,
),
NewTextFields(
AppTextFieldCustom(
hintText: TranslationBase
.of(context)
.historyOfPresentIllness,
controller: illnessController,
maxLines: 25,
minLines: 3,
),
Container(
child: CustomValidationError(error: illnessControllerError,)),
SizedBox(
height: 20,
minLines: 7,
hasBorder: true,
validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null ,
),
SizedBox(
height: 10,
@ -72,16 +68,17 @@ class UpdateChiefComplaints extends StatelessWidget {
SizedBox(
height: 10,
),
NewTextFields(
AppTextFieldCustom(
hintText: TranslationBase
.of(context)
.currentMedications,
controller: medicationController,
maxLines: 25,
minLines: 3,
maxLines: 25,
minLines: 7,
hasBorder: true,
validationError:medicationController.text.isEmpty && medicationControllerError !=''?medicationControllerError:null ,
),
Container(child: CustomValidationError(
error: medicationControllerError,)),
SizedBox(
height: 10,
),

@ -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,
),

Loading…
Cancel
Save