remove double scrollview
This commit is contained in:
@@ -159,149 +159,145 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget displayForm() {
|
Widget displayForm() {
|
||||||
return SingleChildScrollView(
|
return Column(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
Text(
|
||||||
Text(
|
"Personal Details",
|
||||||
"Personal Details",
|
textAlign: TextAlign.center,
|
||||||
textAlign: TextAlign.center,
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontWeight: FontWeight.bold,
|
||||||
fontWeight: FontWeight.bold,
|
fontSize: 22.0,
|
||||||
fontSize: 22.0,
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Divider(
|
),
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MIHTextField(
|
MIHTextField(
|
||||||
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),
|
||||||
|
MIHTextField(
|
||||||
|
controller: fnameController,
|
||||||
|
hintText: "First Name",
|
||||||
|
editable: false,
|
||||||
|
required: true,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10.0),
|
||||||
|
MIHTextField(
|
||||||
|
controller: lnameController,
|
||||||
|
hintText: "Last Name",
|
||||||
|
editable: false,
|
||||||
|
required: true,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10.0),
|
||||||
|
MIHTextField(
|
||||||
|
controller: cellController,
|
||||||
|
hintText: "Cell Number",
|
||||||
|
editable: true,
|
||||||
|
required: true,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10.0),
|
||||||
|
MIHTextField(
|
||||||
|
controller: emailController,
|
||||||
|
hintText: "Email",
|
||||||
|
editable: false,
|
||||||
|
required: true,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10.0),
|
||||||
|
MIHTextField(
|
||||||
|
controller: addressController,
|
||||||
|
hintText: "Address",
|
||||||
|
editable: true,
|
||||||
|
required: true,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 15.0),
|
||||||
|
Text(
|
||||||
|
"Medical Aid Details",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 22.0,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
),
|
||||||
MIHTextField(
|
Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
controller: fnameController,
|
const SizedBox(height: 10.0),
|
||||||
hintText: "First Name",
|
MIHDropdownField(
|
||||||
editable: false,
|
controller: medAidController,
|
||||||
required: true,
|
hintText: "Medical Aid",
|
||||||
),
|
editable: true,
|
||||||
const SizedBox(height: 10.0),
|
// onSelect: (_) {
|
||||||
MIHTextField(
|
// isRequired();
|
||||||
controller: lnameController,
|
// },
|
||||||
hintText: "Last Name",
|
required: true,
|
||||||
editable: false,
|
dropdownOptions: const ["Yes", "No"],
|
||||||
required: true,
|
),
|
||||||
),
|
ValueListenableBuilder(
|
||||||
const SizedBox(height: 10.0),
|
valueListenable: medRequired,
|
||||||
MIHTextField(
|
builder: (BuildContext context, bool value, Widget? child) {
|
||||||
controller: cellController,
|
return Visibility(
|
||||||
hintText: "Cell Number",
|
visible: value,
|
||||||
editable: true,
|
child: Column(
|
||||||
required: true,
|
children: [
|
||||||
),
|
const SizedBox(height: 10.0),
|
||||||
const SizedBox(height: 10.0),
|
MIHDropdownField(
|
||||||
MIHTextField(
|
controller: medMainMemController,
|
||||||
controller: emailController,
|
hintText: "Main Member",
|
||||||
hintText: "Email",
|
editable: value,
|
||||||
editable: false,
|
required: value,
|
||||||
required: true,
|
dropdownOptions: const ["Yes", "No"],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MIHTextField(
|
MIHTextField(
|
||||||
controller: addressController,
|
controller: medNoController,
|
||||||
hintText: "Address",
|
hintText: "Medical Aid No.",
|
||||||
editable: true,
|
editable: value,
|
||||||
required: true,
|
required: value,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 15.0),
|
const SizedBox(height: 10.0),
|
||||||
Text(
|
MIHTextField(
|
||||||
"Medical Aid Details",
|
controller: medAidCodeController,
|
||||||
textAlign: TextAlign.center,
|
hintText: "Medical Aid Code",
|
||||||
style: TextStyle(
|
editable: value,
|
||||||
fontWeight: FontWeight.bold,
|
required: value,
|
||||||
fontSize: 22.0,
|
),
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
const SizedBox(height: 10.0),
|
||||||
),
|
MIHTextField(
|
||||||
),
|
controller: medNameController,
|
||||||
Divider(
|
hintText: "Medical Aid Name",
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
editable: value,
|
||||||
const SizedBox(height: 10.0),
|
required: value,
|
||||||
MIHDropdownField(
|
),
|
||||||
controller: medAidController,
|
const SizedBox(height: 10.0),
|
||||||
hintText: "Medical Aid",
|
MIHTextField(
|
||||||
editable: true,
|
controller: medSchemeController,
|
||||||
// onSelect: (_) {
|
hintText: "Medical Aid Scheme",
|
||||||
// isRequired();
|
editable: value,
|
||||||
// },
|
required: value,
|
||||||
required: true,
|
),
|
||||||
dropdownOptions: const ["Yes", "No"],
|
],
|
||||||
),
|
),
|
||||||
ValueListenableBuilder(
|
);
|
||||||
valueListenable: medRequired,
|
},
|
||||||
builder: (BuildContext context, bool value, Widget? child) {
|
),
|
||||||
return Visibility(
|
const SizedBox(height: 30.0),
|
||||||
visible: value,
|
SizedBox(
|
||||||
child: Column(
|
width: 450.0,
|
||||||
children: [
|
height: 50.0,
|
||||||
const SizedBox(height: 10.0),
|
child: MIHButton(
|
||||||
MIHDropdownField(
|
onTap: () {
|
||||||
controller: medMainMemController,
|
submitForm();
|
||||||
hintText: "Main Member",
|
|
||||||
editable: value,
|
|
||||||
required: value,
|
|
||||||
dropdownOptions: const ["Yes", "No"],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10.0),
|
|
||||||
MIHTextField(
|
|
||||||
controller: medNoController,
|
|
||||||
hintText: "Medical Aid No.",
|
|
||||||
editable: value,
|
|
||||||
required: value,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10.0),
|
|
||||||
MIHTextField(
|
|
||||||
controller: medAidCodeController,
|
|
||||||
hintText: "Medical Aid Code",
|
|
||||||
editable: value,
|
|
||||||
required: value,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10.0),
|
|
||||||
MIHTextField(
|
|
||||||
controller: medNameController,
|
|
||||||
hintText: "Medical Aid Name",
|
|
||||||
editable: value,
|
|
||||||
required: value,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10.0),
|
|
||||||
MIHTextField(
|
|
||||||
controller: medSchemeController,
|
|
||||||
hintText: "Medical Aid Scheme",
|
|
||||||
editable: value,
|
|
||||||
required: value,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
buttonText: "Add",
|
||||||
|
buttonColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 30.0),
|
),
|
||||||
SizedBox(
|
],
|
||||||
width: 450.0,
|
|
||||||
height: 50.0,
|
|
||||||
child: MIHButton(
|
|
||||||
onTap: () {
|
|
||||||
submitForm();
|
|
||||||
},
|
|
||||||
buttonText: "Add",
|
|
||||||
buttonColor:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user