fix pat profile padding
This commit is contained in:
@@ -82,8 +82,12 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getWindowBody() {
|
Widget getWindowBody(double width) {
|
||||||
return Column(
|
return Padding(
|
||||||
|
padding: MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
|
? EdgeInsets.symmetric(horizontal: width * 0.05)
|
||||||
|
: const EdgeInsets.symmetric(horizontal: 0),
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MihForm(
|
MihForm(
|
||||||
formKey: _formKey,
|
formKey: _formKey,
|
||||||
@@ -110,7 +114,8 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
MIHDateField(
|
MIHDateField(
|
||||||
controller: _serviceDateController,
|
controller: _serviceDateController,
|
||||||
@@ -261,7 +266,8 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
|||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: _amountController,
|
controller: _amountController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
@@ -285,12 +291,14 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: _preauthNoController,
|
controller: _preauthNoController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: false,
|
requiredText: false,
|
||||||
@@ -368,6 +376,7 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,19 +468,14 @@ class _ClaimStatementWindowState extends State<ClaimStatementWindow> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
return MihPackageWindow(
|
return MihPackageWindow(
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
windowTitle: "Generate Claim/ Statement Document",
|
windowTitle: "Generate Claim/ Statement Document",
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
// medicineController.clear();
|
|
||||||
// quantityController.clear();
|
|
||||||
// dosageController.clear();
|
|
||||||
// timesDailyController.clear();
|
|
||||||
// noDaysController.clear();
|
|
||||||
// noRepeatsController.clear();
|
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
windowBody: getWindowBody(),
|
windowBody: getWindowBody(screenWidth),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void addNotePopUp() {
|
void addNotePopUp(double width) {
|
||||||
DateTime now = new DateTime.now();
|
DateTime now = new DateTime.now();
|
||||||
DateTime date = new DateTime(now.year, now.month, now.day);
|
DateTime date = new DateTime(now.year, now.month, now.day);
|
||||||
var title = "";
|
var title = "";
|
||||||
@@ -94,7 +94,12 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
titleController.clear();
|
titleController.clear();
|
||||||
noteTextController.clear();
|
noteTextController.clear();
|
||||||
},
|
},
|
||||||
windowBody: Column(
|
windowBody: Padding(
|
||||||
|
padding:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
|
? EdgeInsets.symmetric(horizontal: width * 0.05)
|
||||||
|
: const EdgeInsets.symmetric(horizontal: 0),
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MihForm(
|
MihForm(
|
||||||
formKey: _formKey,
|
formKey: _formKey,
|
||||||
@@ -166,7 +171,8 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 15,
|
height: 15,
|
||||||
child: ValueListenableBuilder(
|
child: ValueListenableBuilder(
|
||||||
builder: (BuildContext context, int value, Widget? child) {
|
builder:
|
||||||
|
(BuildContext context, int value, Widget? child) {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
@@ -206,8 +212,9 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"Add Note",
|
"Add Note",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
@@ -218,6 +225,7 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,40 +279,6 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> setIcons() {
|
|
||||||
if (widget.type == "personal") {
|
|
||||||
return [
|
|
||||||
Text(
|
|
||||||
"Consultation Notes",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 25,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
|
||||||
),
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
return [
|
|
||||||
Text(
|
|
||||||
"Consultation Notes",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 25,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
// addConsultationNotePopUp();
|
|
||||||
addNotePopUp();
|
|
||||||
},
|
|
||||||
icon: Icon(Icons.add,
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
|
||||||
)
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void successPopUp(String message) {
|
void successPopUp(String message) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -349,13 +323,14 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(screenWidth),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getBody() {
|
Widget getBody(double width) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
@@ -413,7 +388,7 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// addConsultationNotePopUp();
|
// addConsultationNotePopUp();
|
||||||
addNotePopUp();
|
addNotePopUp(width);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
final medMainMemController = TextEditingController();
|
final medMainMemController = TextEditingController();
|
||||||
final medAidCodeController = TextEditingController();
|
final medAidCodeController = TextEditingController();
|
||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
double textFieldWidth = 400.0;
|
double textFieldWidth = 500;
|
||||||
late String medAid;
|
late String medAid;
|
||||||
|
|
||||||
Widget getPatientDetailsField() {
|
Widget getPatientDetailsField() {
|
||||||
@@ -48,9 +48,12 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
spacing: 15,
|
spacing: 15,
|
||||||
runSpacing: 10,
|
runSpacing: 10,
|
||||||
children: [
|
children: [
|
||||||
MihTextFormField(
|
SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
|
fillColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: idController,
|
controller: idController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
@@ -61,9 +64,13 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
// return MihValidationServices().isEmpty(value);
|
// return MihValidationServices().isEmpty(value);
|
||||||
// },
|
// },
|
||||||
),
|
),
|
||||||
MihTextFormField(
|
),
|
||||||
|
SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
|
fillColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: fnameController,
|
controller: fnameController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
@@ -71,9 +78,13 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
readOnly: true,
|
readOnly: true,
|
||||||
hintText: "First Name",
|
hintText: "First Name",
|
||||||
),
|
),
|
||||||
MihTextFormField(
|
),
|
||||||
|
SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
|
fillColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: lnameController,
|
controller: lnameController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
@@ -81,9 +92,13 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
hintText: "Surname",
|
hintText: "Surname",
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
),
|
),
|
||||||
MihTextFormField(
|
),
|
||||||
|
SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
|
fillColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: cellController,
|
controller: cellController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
@@ -91,9 +106,13 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
readOnly: true,
|
readOnly: true,
|
||||||
hintText: "Cell No.",
|
hintText: "Cell No.",
|
||||||
),
|
),
|
||||||
MihTextFormField(
|
),
|
||||||
|
SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
|
fillColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: emailController,
|
controller: emailController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
@@ -101,10 +120,14 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
readOnly: true,
|
readOnly: true,
|
||||||
hintText: "Email",
|
hintText: "Email",
|
||||||
),
|
),
|
||||||
MihTextFormField(
|
),
|
||||||
|
SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
height: 100,
|
height: 100,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
fillColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: addressController,
|
controller: addressController,
|
||||||
multiLineInput: true,
|
multiLineInput: true,
|
||||||
@@ -112,6 +135,7 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
readOnly: true,
|
readOnly: true,
|
||||||
hintText: "Address",
|
hintText: "Address",
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -120,8 +144,10 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
Widget getMedAidDetailsFields() {
|
Widget getMedAidDetailsFields() {
|
||||||
List<Widget> medAidDet = [];
|
List<Widget> medAidDet = [];
|
||||||
medAidDet.add(
|
medAidDet.add(
|
||||||
MihTextFormField(
|
SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: medAidController,
|
controller: medAidController,
|
||||||
@@ -130,6 +156,7 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
readOnly: true,
|
readOnly: true,
|
||||||
hintText: "Medical Aid",
|
hintText: "Medical Aid",
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
bool req;
|
bool req;
|
||||||
if (medAid == "Yes") {
|
if (medAid == "Yes") {
|
||||||
@@ -140,8 +167,10 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
medAidDet.addAll([
|
medAidDet.addAll([
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: req,
|
visible: req,
|
||||||
child: MihTextFormField(
|
child: SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: medMainMemController,
|
controller: medMainMemController,
|
||||||
@@ -151,10 +180,13 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
hintText: "Main Member",
|
hintText: "Main Member",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: req,
|
visible: req,
|
||||||
child: MihTextFormField(
|
child: SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: medNoController,
|
controller: medNoController,
|
||||||
@@ -164,10 +196,13 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
hintText: "No.",
|
hintText: "No.",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: req,
|
visible: req,
|
||||||
child: MihTextFormField(
|
child: SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: medAidCodeController,
|
controller: medAidCodeController,
|
||||||
@@ -177,10 +212,12 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
hintText: "Code",
|
hintText: "Code",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: req,
|
visible: req,
|
||||||
|
child: SizedBox(
|
||||||
child: MihTextFormField(
|
child: MihTextFormField(
|
||||||
width: textFieldWidth,
|
// width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: medNameController,
|
controller: medNameController,
|
||||||
@@ -190,10 +227,13 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
hintText: "Name",
|
hintText: "Name",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: req,
|
visible: req,
|
||||||
child: MihTextFormField(
|
child: SizedBox(
|
||||||
width: textFieldWidth,
|
width: textFieldWidth,
|
||||||
|
child: MihTextFormField(
|
||||||
|
// width: textFieldWidth,
|
||||||
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
fillColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
inputColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
controller: medSchemeController,
|
controller: medSchemeController,
|
||||||
@@ -203,6 +243,7 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
hintText: "Plan",
|
hintText: "Plan",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
return Center(
|
return Center(
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
@@ -263,14 +304,15 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
innerHorizontalPadding: 10,
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(screenWidth),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getBody() {
|
Widget getBody(double width) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
|
|||||||
@@ -160,8 +160,12 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget displayForm() {
|
Widget displayForm(double width) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
|
child: Padding(
|
||||||
|
padding: MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
|
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
||||||
|
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MihForm(
|
MihForm(
|
||||||
@@ -184,8 +188,9 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
.theme
|
||||||
|
.secondaryColor()),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
@@ -280,14 +285,16 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 25.0,
|
fontSize: 25.0,
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
.theme
|
||||||
|
.secondaryColor()),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MIHDropdownField(
|
MIHDropdownField(
|
||||||
controller: medAidController,
|
controller: medAidController,
|
||||||
@@ -413,8 +420,9 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"Add",
|
"Add",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
@@ -426,6 +434,7 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,7 +467,7 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
MIHBody getBody() {
|
MIHBody getBody(double width) {
|
||||||
return MIHBody(
|
return MIHBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
bodyItems: [
|
bodyItems: [
|
||||||
@@ -473,7 +482,7 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: displayForm(),
|
child: displayForm(width),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -513,12 +522,12 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
print("Add Patient");
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
return MIHLayoutBuilder(
|
return MIHLayoutBuilder(
|
||||||
actionButton: getActionButton(),
|
actionButton: getActionButton(),
|
||||||
header: getHeader(),
|
header: getHeader(),
|
||||||
secondaryActionButton: null,
|
secondaryActionButton: null,
|
||||||
body: getBody(),
|
body: getBody(screenWidth),
|
||||||
actionDrawer: null,
|
actionDrawer: null,
|
||||||
secondaryActionDrawer: null,
|
secondaryActionDrawer: null,
|
||||||
bottomNavBar: null,
|
bottomNavBar: null,
|
||||||
|
|||||||
@@ -374,8 +374,12 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget displayForm() {
|
Widget displayForm(double width) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
|
child: Padding(
|
||||||
|
padding: MzanziInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
|
? EdgeInsets.symmetric(horizontal: width * 0.2)
|
||||||
|
: EdgeInsets.symmetric(horizontal: width * 0.075),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MihForm(
|
MihForm(
|
||||||
@@ -398,8 +402,9 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
.theme
|
||||||
|
.secondaryColor()),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
@@ -494,14 +499,16 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 25.0,
|
fontSize: 25.0,
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
.theme
|
||||||
|
.secondaryColor()),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MIHDropdownField(
|
MIHDropdownField(
|
||||||
controller: medAidController,
|
controller: medAidController,
|
||||||
@@ -627,8 +634,9 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"Update",
|
"Update",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
@@ -640,6 +648,7 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,7 +681,7 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
MIHBody getBody() {
|
MIHBody getBody(double width) {
|
||||||
return MIHBody(
|
return MIHBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
bodyItems: [
|
bodyItems: [
|
||||||
@@ -687,7 +696,7 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: displayForm(),
|
child: displayForm(width),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -747,61 +756,12 @@ class _EditPatientState extends State<EditPatient> {
|
|||||||
actionButton: getActionButton(),
|
actionButton: getActionButton(),
|
||||||
header: getHeader(),
|
header: getHeader(),
|
||||||
secondaryActionButton: null,
|
secondaryActionButton: null,
|
||||||
body: getBody(),
|
body: getBody(width),
|
||||||
actionDrawer: null,
|
actionDrawer: null,
|
||||||
secondaryActionDrawer: null,
|
secondaryActionDrawer: null,
|
||||||
bottomNavBar: null,
|
bottomNavBar: null,
|
||||||
pullDownToRefresh: false,
|
pullDownToRefresh: false,
|
||||||
onPullDown: () async {},
|
onPullDown: () async {},
|
||||||
);
|
);
|
||||||
// return Scaffold(
|
|
||||||
// // appBar: const MIHAppBar(
|
|
||||||
// // barTitle: "Edit Patient",
|
|
||||||
// // propicFile: null,
|
|
||||||
// // ),
|
|
||||||
// body: SafeArea(
|
|
||||||
// child: Stack(
|
|
||||||
// children: [
|
|
||||||
// KeyboardListener(
|
|
||||||
// focusNode: _focusNode,
|
|
||||||
// autofocus: true,
|
|
||||||
// onKeyEvent: (event) async {
|
|
||||||
// if (event is KeyDownEvent &&
|
|
||||||
// event.logicalKey == LogicalKeyboardKey.enter) {
|
|
||||||
// submitForm();
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// child: displayForm(),
|
|
||||||
// ),
|
|
||||||
// Positioned(
|
|
||||||
// top: 10,
|
|
||||||
// left: 5,
|
|
||||||
// width: 50,
|
|
||||||
// height: 50,
|
|
||||||
// child: IconButton(
|
|
||||||
// onPressed: () {
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
// },
|
|
||||||
// icon: const Icon(Icons.arrow_back),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Positioned(
|
|
||||||
// top: 10,
|
|
||||||
// right: 5,
|
|
||||||
// width: 50,
|
|
||||||
// height: 50,
|
|
||||||
// child: IconButton(
|
|
||||||
// icon: const Icon(Icons.delete),
|
|
||||||
// color:
|
|
||||||
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
// //alignment: Alignment.topRight,
|
|
||||||
// onPressed: () {
|
|
||||||
// deletePatientPopUp();
|
|
||||||
// },
|
|
||||||
// ))
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user