|
|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
|
|
|
|
|
import '../custom_validation_error.dart';
|
|
|
|
|
|
|
|
|
|
class UpdateChiefComplaints extends StatelessWidget {
|
|
|
|
|
const UpdateChiefComplaints({
|
|
|
|
|
@ -13,18 +13,24 @@ class UpdateChiefComplaints extends StatelessWidget {
|
|
|
|
|
@required this.complaintsController,
|
|
|
|
|
@required this.illnessController,
|
|
|
|
|
@required this.medicationController,
|
|
|
|
|
this.complaintsControllerError,
|
|
|
|
|
this.illnessControllerError,
|
|
|
|
|
this.medicationControllerError,
|
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
final GlobalKey<FormState> formKey;
|
|
|
|
|
final TextEditingController complaintsController;
|
|
|
|
|
final TextEditingController illnessController;
|
|
|
|
|
final TextEditingController medicationController;
|
|
|
|
|
final String complaintsControllerError;
|
|
|
|
|
final String illnessControllerError;
|
|
|
|
|
final String medicationControllerError;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Form(
|
|
|
|
|
key: formKey,
|
|
|
|
|
child: Column(children: [
|
|
|
|
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
@ -33,9 +39,14 @@ class UpdateChiefComplaints extends StatelessWidget {
|
|
|
|
|
hintText: TranslationBase.of(context).addChiefComplaints,
|
|
|
|
|
controller: complaintsController,
|
|
|
|
|
maxLines: 25,
|
|
|
|
|
minLines: 13,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
child: CustomValidationError(
|
|
|
|
|
error: complaintsControllerError,
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
// margin:
|
|
|
|
|
// EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
@ -66,89 +77,46 @@ class UpdateChiefComplaints extends StatelessWidget {
|
|
|
|
|
// return null;
|
|
|
|
|
// }),
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
NewTextFields(
|
|
|
|
|
hintText: TranslationBase.of(context).historyOfPresentIllness,
|
|
|
|
|
controller: illnessController,
|
|
|
|
|
maxLines: 25,
|
|
|
|
|
minLines: 13,
|
|
|
|
|
),
|
|
|
|
|
// Container(
|
|
|
|
|
// margin:
|
|
|
|
|
// EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
// child: TextFields(
|
|
|
|
|
// hasLabelText:
|
|
|
|
|
// illnessController.text != '' ? true : false,
|
|
|
|
|
// showLabelText: true,
|
|
|
|
|
// hintText: TranslationBase
|
|
|
|
|
// .of(context)
|
|
|
|
|
// .historyOfPresentIllness,
|
|
|
|
|
// fontSize: 13.5,
|
|
|
|
|
// // hintColor: Colors.black,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// maxLines: 25,
|
|
|
|
|
// minLines: 13,
|
|
|
|
|
// controller: illnessController,
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// if (value == null || value == "")
|
|
|
|
|
// return TranslationBase.of(context)
|
|
|
|
|
// .emptyMessage;
|
|
|
|
|
// else
|
|
|
|
|
// return null;
|
|
|
|
|
// }),
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
UpdateMedicationWidget(
|
|
|
|
|
medicationController: medicationController,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
// Container(
|
|
|
|
|
// margin:
|
|
|
|
|
// EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
// child: TextFields(
|
|
|
|
|
// hasLabelText: medicationController.text != ''
|
|
|
|
|
// ? true
|
|
|
|
|
// : false,
|
|
|
|
|
// showLabelText: true,
|
|
|
|
|
// hintText: TranslationBase
|
|
|
|
|
// .of(context)
|
|
|
|
|
// .currentMedications,
|
|
|
|
|
// fontSize: 13.5,
|
|
|
|
|
// // hintColor: Colors.black,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// maxLines: 23,
|
|
|
|
|
// minLines: 10,
|
|
|
|
|
// controller: medicationController,
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// if (value == null || value == "")
|
|
|
|
|
// return TranslationBase
|
|
|
|
|
// .of(context)
|
|
|
|
|
// .emptyMessage;
|
|
|
|
|
// else
|
|
|
|
|
// return null;
|
|
|
|
|
// }),
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
NewTextFields(
|
|
|
|
|
hintText: TranslationBase.of(context).currentMedications,
|
|
|
|
|
controller: medicationController,
|
|
|
|
|
maxLines: 23,
|
|
|
|
|
minLines: 10,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
NewTextFields(
|
|
|
|
|
hintText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.historyOfPresentIllness,
|
|
|
|
|
controller: illnessController,
|
|
|
|
|
maxLines: 25,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: CustomValidationError(error: illnessControllerError,)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
UpdateMedicationWidget(
|
|
|
|
|
medicationController: medicationController,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
NewTextFields(
|
|
|
|
|
hintText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.currentMedications,
|
|
|
|
|
controller: medicationController,
|
|
|
|
|
maxLines: 25,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
),
|
|
|
|
|
Container(child: CustomValidationError(
|
|
|
|
|
error: medicationControllerError,)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|