textfields no wrap when screen changes size
This commit is contained in:
@@ -26,6 +26,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
final medAidCodeController = TextEditingController();
|
final medAidCodeController = TextEditingController();
|
||||||
double? headingFontSize = 35.0;
|
double? headingFontSize = 35.0;
|
||||||
double? bodyFonstSize = 20.0;
|
double? bodyFonstSize = 20.0;
|
||||||
|
double textFieldWidth = 400.0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -60,7 +61,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 10),
|
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -100,58 +101,57 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
Divider(
|
Divider(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Column(
|
Wrap(
|
||||||
|
spacing: 15,
|
||||||
|
runSpacing: 10,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
SizedBox(
|
||||||
children: [
|
width: textFieldWidth,
|
||||||
Expanded(
|
child: MyTextField(
|
||||||
child: MyTextField(
|
controller: idController,
|
||||||
controller: idController,
|
hintText: "ID No.",
|
||||||
hintText: "ID No.",
|
editable: false,
|
||||||
editable: false,
|
required: false),
|
||||||
required: false),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: MyTextField(
|
|
||||||
controller: fnameController,
|
|
||||||
hintText: "Name",
|
|
||||||
editable: false,
|
|
||||||
required: false),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: MyTextField(
|
|
||||||
controller: lnameController,
|
|
||||||
hintText: "Surname",
|
|
||||||
editable: false,
|
|
||||||
required: false),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
SizedBox(
|
||||||
Row(
|
width: textFieldWidth,
|
||||||
children: [
|
child: MyTextField(
|
||||||
Expanded(
|
controller: fnameController,
|
||||||
child: MyTextField(
|
hintText: "Name",
|
||||||
controller: cellController,
|
editable: false,
|
||||||
hintText: "Cell No.",
|
required: false),
|
||||||
editable: false,
|
),
|
||||||
required: false),
|
SizedBox(
|
||||||
),
|
width: textFieldWidth,
|
||||||
Expanded(
|
child: MyTextField(
|
||||||
child: MyTextField(
|
controller: lnameController,
|
||||||
controller: emailController,
|
hintText: "Surname",
|
||||||
hintText: "Email",
|
editable: false,
|
||||||
editable: false,
|
required: false),
|
||||||
required: false),
|
),
|
||||||
),
|
SizedBox(
|
||||||
Expanded(
|
width: textFieldWidth,
|
||||||
child: MyTextField(
|
child: MyTextField(
|
||||||
controller: addressController,
|
controller: cellController,
|
||||||
hintText: "Address",
|
hintText: "Cell No.",
|
||||||
editable: false,
|
editable: false,
|
||||||
required: false),
|
required: false),
|
||||||
),
|
),
|
||||||
],
|
SizedBox(
|
||||||
|
width: textFieldWidth,
|
||||||
|
child: MyTextField(
|
||||||
|
controller: emailController,
|
||||||
|
hintText: "Email",
|
||||||
|
editable: false,
|
||||||
|
required: false),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: textFieldWidth,
|
||||||
|
child: MyTextField(
|
||||||
|
controller: addressController,
|
||||||
|
hintText: "Address",
|
||||||
|
editable: false,
|
||||||
|
required: false),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -168,61 +168,60 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
Divider(
|
Divider(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Column(
|
Wrap(
|
||||||
|
spacing: 10,
|
||||||
|
runSpacing: 10,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
SizedBox(
|
||||||
children: [
|
width: textFieldWidth,
|
||||||
Expanded(
|
child: MyTextField(
|
||||||
child: MyTextField(
|
controller: medAidController,
|
||||||
controller: medAidController,
|
hintText: "Has Medical Aid",
|
||||||
hintText: "Has Medical Aid",
|
editable: false,
|
||||||
editable: false,
|
required: false),
|
||||||
required: false),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: MyTextField(
|
|
||||||
controller: medMainMemController,
|
|
||||||
hintText: "Main Member",
|
|
||||||
editable: false,
|
|
||||||
required: false),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: MyTextField(
|
|
||||||
controller: medNoController,
|
|
||||||
hintText: "No.",
|
|
||||||
editable: false,
|
|
||||||
required: false),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
SizedBox(
|
||||||
Row(
|
width: textFieldWidth,
|
||||||
children: [
|
child: MyTextField(
|
||||||
Expanded(
|
controller: medMainMemController,
|
||||||
child: MyTextField(
|
hintText: "Main Member",
|
||||||
controller: medAidCodeController,
|
editable: false,
|
||||||
hintText: "Code",
|
required: false),
|
||||||
editable: false,
|
),
|
||||||
required: false),
|
SizedBox(
|
||||||
),
|
width: textFieldWidth,
|
||||||
Expanded(
|
child: MyTextField(
|
||||||
child: MyTextField(
|
controller: medNoController,
|
||||||
controller: medNameController,
|
hintText: "No.",
|
||||||
hintText: "Name",
|
editable: false,
|
||||||
editable: false,
|
required: false),
|
||||||
required: false),
|
),
|
||||||
),
|
SizedBox(
|
||||||
Expanded(
|
width: textFieldWidth,
|
||||||
child: MyTextField(
|
child: MyTextField(
|
||||||
controller: medSchemeController,
|
controller: medAidCodeController,
|
||||||
hintText: "Scheme",
|
hintText: "Code",
|
||||||
editable: false,
|
editable: false,
|
||||||
required: false),
|
required: false),
|
||||||
),
|
),
|
||||||
],
|
SizedBox(
|
||||||
|
width: textFieldWidth,
|
||||||
|
child: MyTextField(
|
||||||
|
controller: medNameController,
|
||||||
|
hintText: "Name",
|
||||||
|
editable: false,
|
||||||
|
required: false),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: textFieldWidth,
|
||||||
|
child: MyTextField(
|
||||||
|
controller: medSchemeController,
|
||||||
|
hintText: "Scheme",
|
||||||
|
editable: false,
|
||||||
|
required: false),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -91,14 +91,14 @@ class _PatientViewState extends State<PatientView> {
|
|||||||
alignment: WrapAlignment.center,
|
alignment: WrapAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 650,
|
width: 660,
|
||||||
child: PatientNotes(
|
child: PatientNotes(
|
||||||
patientAppId: snapshot.data!.app_id,
|
patientAppId: snapshot.data!.app_id,
|
||||||
signedInUser: widget.signedInUser,
|
signedInUser: widget.signedInUser,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 650,
|
width: 660,
|
||||||
child: PatientFiles(
|
child: PatientFiles(
|
||||||
patientIndex: snapshot.data!.idpatients,
|
patientIndex: snapshot.data!.idpatients,
|
||||||
selectedPatient: snapshot.data!,
|
selectedPatient: snapshot.data!,
|
||||||
|
|||||||
Reference in New Issue
Block a user