fix overflow issues

This commit is contained in:
2024-07-30 14:11:28 +02:00
parent 91e2f81692
commit 650a6a947a

View File

@@ -168,83 +168,57 @@ class _AddPatientState extends State<AddPatient> {
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
), ),
), ),
Row( const SizedBox(height: 10.0),
children: [ MyTextField(
Expanded(
child: MyTextField(
controller: idController, controller: idController,
hintText: "13 digit ID Number or Passport", hintText: "13 digit ID Number or Passport",
editable: true, editable: true,
required: true, required: true,
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row( MyTextField(
children: [
Expanded(
child: MyTextField(
controller: fnameController, controller: fnameController,
hintText: "First Name", hintText: "First Name",
editable: false, editable: false,
required: true, required: true,
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row( MyTextField(
children: [
Expanded(
child: MyTextField(
controller: lnameController, controller: lnameController,
hintText: "Last Name", hintText: "Last Name",
editable: false, editable: false,
required: true, required: true,
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row(
children: [ MyTextField(
Expanded(
child: MyTextField(
controller: cellController, controller: cellController,
hintText: "Cell Number", hintText: "Cell Number",
editable: true, editable: true,
required: true, required: true,
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row(
children: [ MyTextField(
Expanded(
child: MyTextField(
controller: emailController, controller: emailController,
hintText: "Email", hintText: "Email",
editable: false, editable: false,
required: true, required: true,
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row(
children: [ MyTextField(
Expanded(
child: MyTextField(
controller: addressController, controller: addressController,
hintText: "Address", hintText: "Address",
editable: true, editable: true,
required: true, required: true,
), ),
),
],
),
const SizedBox(height: 15.0), const SizedBox(height: 15.0),
Text( Text(
"Medical Aid Details", "Medical Aid Details",
@@ -256,10 +230,8 @@ class _AddPatientState extends State<AddPatient> {
), ),
), ),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row(
children: [ MyDropdownField(
Expanded(
child: MyDropdownField(
controller: medAidController, controller: medAidController,
hintText: "Medical Aid", hintText: "Medical Aid",
editable: true, editable: true,
@@ -269,79 +241,53 @@ class _AddPatientState extends State<AddPatient> {
required: true, required: true,
dropdownOptions: const ["Yes", "No"], dropdownOptions: const ["Yes", "No"],
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row( MyDropdownField(
children: [
Expanded(
child: MyDropdownField(
controller: medMainMemController, controller: medMainMemController,
hintText: "Main Member", hintText: "Main Member",
editable: medRequired, editable: medRequired,
required: medRequired, required: medRequired,
dropdownOptions: const ["Yes", "No"], dropdownOptions: const ["Yes", "No"],
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row( MyTextField(
children: [
Expanded(
child: MyTextField(
controller: medNoController, controller: medNoController,
hintText: "Medical Aid No.", hintText: "Medical Aid No.",
editable: medRequired, editable: medRequired,
required: medRequired, required: medRequired,
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row(
children: [ MyTextField(
Expanded(
child: MyTextField(
controller: medAidCodeController, controller: medAidCodeController,
hintText: "Medical Aid Code", hintText: "Medical Aid Code",
editable: medRequired, editable: medRequired,
required: medRequired, required: medRequired,
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row(
children: [ MyTextField(
Expanded(
child: MyTextField(
controller: medNameController, controller: medNameController,
hintText: "Medical Aid Name", hintText: "Medical Aid Name",
editable: medRequired, editable: medRequired,
required: medRequired, required: medRequired,
), ),
),
],
),
const SizedBox(height: 10.0), const SizedBox(height: 10.0),
Row(
children: [ MyTextField(
Expanded(
child: MyTextField(
controller: medSchemeController, controller: medSchemeController,
hintText: "Medical Aid Scheme", hintText: "Medical Aid Scheme",
editable: medRequired, editable: medRequired,
required: medRequired, required: medRequired,
), ),
),
],
),
//const SizedBox(height: 10.0), //const SizedBox(height: 10.0),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox( SizedBox(
width: 450.0, width: 450.0,
height: 100.0, height: 100.0,
@@ -353,8 +299,7 @@ class _AddPatientState extends State<AddPatient> {
showDialog( showDialog(
context: context, context: context,
builder: (context) { builder: (context) {
return const MyErrorMessage( return const MyErrorMessage(errorType: "Input Error");
errorType: "Input Error");
}, },
); );
} }
@@ -368,8 +313,6 @@ class _AddPatientState extends State<AddPatient> {
), ),
], ],
), ),
],
),
), ),
); );
} }