fix box alainments for all screen sizes
This commit is contained in:
@@ -302,9 +302,12 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final Size size = MediaQuery.sizeOf(context);
|
||||||
|
//double width = size.width;
|
||||||
|
double height = size.height;
|
||||||
if (widget.files.isNotEmpty) {
|
if (widget.files.isNotEmpty) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 500.0,
|
height: height - 250,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
@@ -353,9 +356,9 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return const SizedBox(
|
return SizedBox(
|
||||||
height: 500.0,
|
height: height - 250,
|
||||||
child: Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"No Documents Available",
|
"No Documents Available",
|
||||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||||
|
|||||||
@@ -263,9 +263,12 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final Size size = MediaQuery.sizeOf(context);
|
||||||
|
//double width = size.width;
|
||||||
|
double height = size.height;
|
||||||
if (widget.notes.isNotEmpty) {
|
if (widget.notes.isNotEmpty) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 500.0,
|
height: height - 250,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
@@ -306,9 +309,9 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return const SizedBox(
|
return SizedBox(
|
||||||
height: 500.0,
|
height: height - 250,
|
||||||
child: Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"No Notes Available",
|
"No Notes Available",
|
||||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||||
|
|||||||
@@ -264,7 +264,12 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final Size size = MediaQuery.sizeOf(context);
|
||||||
|
//double width = size.width;
|
||||||
|
double height = size.height;
|
||||||
return Container(
|
return Container(
|
||||||
|
alignment: Alignment.topCenter,
|
||||||
|
height: height - 177,
|
||||||
padding: const EdgeInsets.only(left: 10, right: 10, 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(),
|
||||||
@@ -275,7 +280,11 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
),
|
),
|
||||||
//constraints: const BoxConstraints.expand(height: 250.0),
|
//constraints: const BoxConstraints.expand(height: 250.0),
|
||||||
child: SelectionArea(
|
child: SelectionArea(
|
||||||
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@@ -283,7 +292,8 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
children: setIcons(),
|
children: setIcons(),
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
getPatientDetailsField(),
|
getPatientDetailsField(),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
@@ -293,16 +303,19 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
getMedAidDetailsFields(),
|
getMedAidDetailsFields(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
},
|
},
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: w,
|
width: w,
|
||||||
height: 600,
|
height: h - 157,
|
||||||
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
||||||
const SizedBox(height: 5),
|
const SizedBox(height: 5),
|
||||||
const Text(
|
const Text(
|
||||||
@@ -302,7 +302,7 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
Widget patientQueue(double w, double h) {
|
Widget patientQueue(double w, double h) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: w,
|
width: w,
|
||||||
height: 600,
|
height: h - 157,
|
||||||
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
||||||
//const SizedBox(height: 15),
|
//const SizedBox(height: 15),
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
Reference in New Issue
Block a user