Patient view size fix
This commit is contained in:
@@ -303,7 +303,7 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
double height = size.height;
|
double height = size.height;
|
||||||
if (widget.files.isNotEmpty) {
|
if (widget.files.isNotEmpty) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: height - 254,
|
height: height - 177,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
@@ -353,7 +353,7 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: height - 250,
|
height: height - 150,
|
||||||
child: const Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"No Documents Available",
|
"No Documents Available",
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
double height = size.height;
|
double height = size.height;
|
||||||
if (widget.notes.isNotEmpty) {
|
if (widget.notes.isNotEmpty) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: height - 250,
|
height: height - 173,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
@@ -322,7 +322,7 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: height - 250,
|
height: height - 173,
|
||||||
child: const Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"No Notes Available",
|
"No Notes Available",
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
|||||||
double height = size.height;
|
double height = size.height;
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
height: height - 177,
|
height: height - 100,
|
||||||
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(),
|
||||||
|
|||||||
@@ -651,7 +651,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
|||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
return Container(
|
return Container(
|
||||||
height: height - 177,
|
height: height - 100,
|
||||||
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),
|
||||||
@@ -703,7 +703,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Container(
|
return Container(
|
||||||
height: height - 177,
|
height: height - 175,
|
||||||
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),
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
|||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
return Container(
|
return Container(
|
||||||
height: height - 177,
|
height: height - 100,
|
||||||
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),
|
||||||
@@ -391,7 +391,7 @@ class _PatientNotesState extends State<PatientNotes> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Container(
|
return Container(
|
||||||
height: height - 177,
|
height: height - 100,
|
||||||
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),
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
|
|||||||
padding: const EdgeInsets.all(15.0),
|
padding: const EdgeInsets.all(15.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: w,
|
width: w,
|
||||||
height: h - 105,
|
height: h,
|
||||||
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
||||||
//const SizedBox(height: 15),
|
//const SizedBox(height: 15),
|
||||||
const Text(
|
const Text(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:patient_manager/components/patientDetails.dart';
|
|||||||
import 'package:patient_manager/components/patientFiles.dart';
|
import 'package:patient_manager/components/patientFiles.dart';
|
||||||
import 'package:patient_manager/components/patientNotes.dart';
|
import 'package:patient_manager/components/patientNotes.dart';
|
||||||
import 'package:patient_manager/env/env.dart';
|
import 'package:patient_manager/env/env.dart';
|
||||||
|
import 'package:patient_manager/main.dart';
|
||||||
import 'package:patient_manager/objects/arguments.dart';
|
import 'package:patient_manager/objects/arguments.dart';
|
||||||
import 'package:patient_manager/objects/patients.dart';
|
import 'package:patient_manager/objects/patients.dart';
|
||||||
import 'package:supertokens_flutter/http.dart' as http;
|
import 'package:supertokens_flutter/http.dart' as http;
|
||||||
@@ -23,6 +24,16 @@ class PatientView extends StatefulWidget {
|
|||||||
|
|
||||||
class _PatientViewState extends State<PatientView> {
|
class _PatientViewState extends State<PatientView> {
|
||||||
int _selectedIndex = 0;
|
int _selectedIndex = 0;
|
||||||
|
late double popUpWidth;
|
||||||
|
late double? popUpheight;
|
||||||
|
late double popUpTitleSize;
|
||||||
|
late double popUpSubtitleSize;
|
||||||
|
late double popUpBodySize;
|
||||||
|
late double popUpIconSize;
|
||||||
|
late double popUpPaddingSize;
|
||||||
|
late double width;
|
||||||
|
late double height;
|
||||||
|
|
||||||
Future<Patient?> fetchPatient() async {
|
Future<Patient?> fetchPatient() async {
|
||||||
//print("Patien manager page: $endpoint");
|
//print("Patien manager page: $endpoint");
|
||||||
var patientAppId = widget.arguments.selectedPatient!.app_id;
|
var patientAppId = widget.arguments.selectedPatient!.app_id;
|
||||||
@@ -47,6 +58,20 @@ class _PatientViewState extends State<PatientView> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void checkScreenSize() {
|
||||||
|
if (MzanziInnovationHub.of(context)!.theme.screenType == "desktop") {
|
||||||
|
setState(() {
|
||||||
|
popUpWidth = (width / 4) * 2;
|
||||||
|
popUpheight = null;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
popUpWidth = width - (width * 0.1);
|
||||||
|
popUpheight = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Widget showSelection(int index) {
|
Widget showSelection(int index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return PatientDetails(
|
return PatientDetails(
|
||||||
@@ -83,22 +108,24 @@ class _PatientViewState extends State<PatientView> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// loadImage();
|
var size = MediaQuery.of(context).size;
|
||||||
// var logo = MzanziInnovationHub.of(context)!.theme.logoImage();
|
setState(() {
|
||||||
|
width = size.width;
|
||||||
|
height = size.height;
|
||||||
|
});
|
||||||
|
checkScreenSize();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
// appBar: const MIHAppBar(
|
|
||||||
// barTitle: "Patient Profile",
|
|
||||||
// propicFile: null,
|
|
||||||
// ),
|
|
||||||
//drawer: showDrawer(),
|
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Container(
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
vertical: 10.0, horizontal: 15.0),
|
vertical: 10.0, horizontal: 15.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
@@ -140,7 +167,7 @@ class _PatientViewState extends State<PatientView> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 25.0,
|
height: 10.0,
|
||||||
),
|
),
|
||||||
showSelection(_selectedIndex),
|
showSelection(_selectedIndex),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user