update UI to remove app bar

This commit is contained in:
2024-08-29 12:16:21 +02:00
parent aba7bbce27
commit 12b51cbddc
8 changed files with 816 additions and 710 deletions

View File

@@ -3,8 +3,6 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:patient_manager/components/builders/buildAccessRequestList.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart';
import 'package:patient_manager/components/mihAppBar.dart';
//import 'package:patient_manager/components/mihAppDrawer.dart';
import 'package:patient_manager/components/popUpMessages/mihLoadingCircle.dart';
import 'package:patient_manager/env/env.dart';
import 'package:patient_manager/main.dart';
@@ -103,7 +101,7 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
);
}
return Container(
//height: 500,
height: 500,
decoration: BoxDecoration(
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
borderRadius: BorderRadius.circular(25.0),
@@ -131,28 +129,14 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
height: 600,
child: Column(mainAxisSize: MainAxisSize.max, children: [
//const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
//const SizedBox(height: 25),
const Text(
"Access Request",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
),
IconButton(
onPressed: () {
setState(() {
forceRefresh = true;
});
refreshList();
},
icon: const Icon(
Icons.refresh,
))
],
),
const SizedBox(height: 10),
const SizedBox(height: 25),
SizedBox(
width: 500,
child: MIHDropdownField(
@@ -169,7 +153,8 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
builder: (context, snapshot) {
//print("patient Queue List ${snapshot.hasData}");
if (snapshot.connectionState == ConnectionState.waiting) {
return Container(
return Expanded(
child: Container(
//height: 500,
decoration: BoxDecoration(
color:
@@ -182,6 +167,7 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
width: 3.0),
),
child: const Mihloadingcircle(),
),
);
} else if (snapshot.connectionState == ConnectionState.done) {
List<AccessRequest> accessRequestList;
@@ -267,12 +253,47 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
final screenWidth = MediaQuery.of(context).size.width;
final screenHeight = MediaQuery.of(context).size.height;
return Scaffold(
appBar: const MIHAppBar(
barTitle: "Access Reviews",
propicFile: null,
),
// appBar: const MIHAppBar(
// barTitle: "Access Reviews",
// propicFile: null,
// ),
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
body: SafeArea(child: viewAccessRequest(screenWidth, screenHeight)),
body: SafeArea(
child: Stack(
children: [
viewAccessRequest(screenWidth, screenHeight),
Positioned(
top: 10,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
),
Positioned(
top: 10,
right: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
setState(() {
forceRefresh = true;
});
refreshList();
},
icon: const Icon(
Icons.refresh,
),
),
)
],
),
),
);
}
}

View File

@@ -12,7 +12,6 @@ import 'package:patient_manager/env/env.dart';
import 'package:patient_manager/main.dart';
import 'package:patient_manager/objects/appUser.dart';
import 'package:patient_manager/objects/arguments.dart';
import '../components/mihAppBar.dart';
import 'package:supertokens_flutter/http.dart' as http;
class AddPatient extends StatefulWidget {
@@ -160,7 +159,7 @@ class _AddPatientState extends State<AddPatient> {
Widget displayForm() {
return SingleChildScrollView(
padding: const EdgeInsets.all(25.0),
padding: const EdgeInsets.all(15.0),
child: Column(
children: [
Text(
@@ -172,7 +171,7 @@ class _AddPatientState extends State<AddPatient> {
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
const SizedBox(height: 10.0),
const SizedBox(height: 25.0),
MIHTextField(
controller: idController,
hintText: "13 digit ID Number or Passport",
@@ -343,13 +342,15 @@ class _AddPatientState extends State<AddPatient> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const MIHAppBar(
barTitle: "Add Patient",
propicFile: null,
),
// appBar: const MIHAppBar(
// barTitle: "Add Patient",
// propicFile: null,
// ),
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
body: SafeArea(
child: KeyboardListener(
child: Stack(
children: [
KeyboardListener(
focusNode: _focusNode,
autofocus: true,
onKeyEvent: (event) async {
@@ -360,6 +361,20 @@ class _AddPatientState extends State<AddPatient> {
},
child: displayForm(),
),
Positioned(
top: 10,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
)
],
),
),
);
}

View File

@@ -2,7 +2,6 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:patient_manager/components/mihAppBar.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
import 'package:patient_manager/components/popUpMessages/mihSuccessMessage.dart';
@@ -367,11 +366,8 @@ class _EditPatientState extends State<EditPatient> {
Widget displayForm() {
return SingleChildScrollView(
padding: const EdgeInsets.all(25.0),
padding: const EdgeInsets.all(15.0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Personal Details",
@@ -379,21 +375,10 @@ class _EditPatientState extends State<EditPatient> {
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25.0,
color:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
IconButton(
icon: const Icon(Icons.delete),
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
alignment: Alignment.topRight,
onPressed: () {
deletePatientPopUp();
},
)
],
),
const SizedBox(height: 10.0),
),
const SizedBox(height: 25.0),
MIHTextField(
controller: idController,
hintText: "13 digit ID Number or Passport",
@@ -608,12 +593,14 @@ class _EditPatientState extends State<EditPatient> {
});
return Scaffold(
appBar: const MIHAppBar(
barTitle: "Edit Patient",
propicFile: null,
),
// appBar: const MIHAppBar(
// barTitle: "Edit Patient",
// propicFile: null,
// ),
body: SafeArea(
child: KeyboardListener(
child: Stack(
children: [
KeyboardListener(
focusNode: _focusNode,
autofocus: true,
onKeyEvent: (event) async {
@@ -624,6 +611,34 @@ class _EditPatientState extends State<EditPatient> {
},
child: displayForm(),
),
Positioned(
top: 10,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
),
Positioned(
top: 10,
right: 5,
width: 50,
height: 50,
child: IconButton(
icon: const Icon(Icons.delete),
color:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
//alignment: Alignment.topRight,
onPressed: () {
deletePatientPopUp();
},
))
],
),
),
);
}

View File

@@ -6,8 +6,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:patient_manager/components/builders/buildPatientList.dart';
import 'package:patient_manager/components/builders/buildPatientQueueList.dart';
import 'package:patient_manager/components/mihAppBar.dart';
//import 'package:patient_manager/components/mihAppDrawer.dart';
import 'package:patient_manager/components/popUpMessages/mihLoadingCircle.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDateInput.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
@@ -309,23 +307,10 @@ class _PatientManagerState extends State<PatientManager> {
height: h - 157,
child: Column(mainAxisSize: MainAxisSize.max, children: [
//const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const Text(
"Waiting Room",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
),
IconButton(
onPressed: () {
refreshQueue();
},
icon: const Icon(
Icons.refresh,
))
],
),
const SizedBox(height: 10),
MIHDateField(
controller: queueDateController,
@@ -478,34 +463,17 @@ class _PatientManagerState extends State<PatientManager> {
final screenWidth = MediaQuery.of(context).size.width;
final screenHeight = MediaQuery.of(context).size.height;
return Scaffold(
appBar: const MIHAppBar(
barTitle: "Patient Manager",
propicFile: null,
),
//drawer: MIHAppDrawer(signedInUser: widget.arguments.signedInUser),
//floatingActionButtonLocation: FloatingActionButtonLocation.,
// floatingActionButton: FloatingActionButton.extended(
// label: Text(
// "Add Patient",
// style: TextStyle(
// fontWeight: FontWeight.bold,
// color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
// appBar: const MIHAppBar(
// barTitle: "Patient Manager",
// propicFile: null,
// ),
// ),
// //backgroundColor: Colors.blueAccent,
// onPressed: () {
// Navigator.of(context).pushNamed('/patient-manager/add',
// arguments: widget.signedInUser.email);
// },
// icon: Icon(
// Icons.add,
// color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
// ),
// ),
body: Column(
body: Stack(
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 5),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
@@ -532,6 +500,15 @@ class _PatientManagerState extends State<PatientManager> {
size: 35,
),
),
IconButton(
onPressed: () {
refreshQueue();
},
icon: const Icon(
Icons.refresh,
size: 35,
),
),
],
),
Padding(
@@ -540,6 +517,20 @@ class _PatientManagerState extends State<PatientManager> {
),
],
),
Positioned(
top: 5,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
)
],
),
);
}
}

View File

@@ -3,7 +3,6 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:patient_manager/components/mihAppDrawer.dart';
import 'package:patient_manager/components/patientDetails.dart';
import 'package:patient_manager/components/mihAppBar.dart';
import 'package:patient_manager/components/patientFiles.dart';
import 'package:patient_manager/components/patientNotes.dart';
import 'package:patient_manager/env/env.dart';
@@ -96,16 +95,18 @@ class _PatientViewState extends State<PatientView> {
// loadImage();
// var logo = MzanziInnovationHub.of(context)!.theme.logoImage();
return Scaffold(
appBar: const MIHAppBar(
barTitle: "Patient Profile",
propicFile: null,
),
// appBar: const MIHAppBar(
// barTitle: "Patient Profile",
// propicFile: null,
// ),
//drawer: showDrawer(),
body: SafeArea(
child: SingleChildScrollView(
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0),
child: Stack(
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 10.0, horizontal: 15.0),
child: Column(
children: [
Row(
@@ -148,12 +149,26 @@ class _PatientViewState extends State<PatientView> {
],
),
const SizedBox(
height: 10.0,
height: 25.0,
),
showSelection(_selectedIndex),
],
),
),
Positioned(
top: 10,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
)
],
),
),
),
);

View File

@@ -2,8 +2,6 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:patient_manager/components/mihAppBar.dart';
//import 'package:patient_manager/components/mihAppDrawer.dart';
import 'package:patient_manager/components/popUpMessages/mihLoadingCircle.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
@@ -229,13 +227,15 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const MIHAppBar(
barTitle: "Add Business",
propicFile: null,
),
// appBar: const MIHAppBar(
// barTitle: "Add Business",
// propicFile: null,
// ),
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
body: SafeArea(
child: KeyboardListener(
child: Stack(
children: [
KeyboardListener(
focusNode: _focusNode,
autofocus: true,
onKeyEvent: (event) async {
@@ -245,17 +245,18 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
}
},
child: SingleChildScrollView(
padding: EdgeInsets.all(25),
padding: const EdgeInsets.all(15),
child: Column(
children: [
//const SizedBox(height: 15),
const Text(
"Add Business Profile:",
"Add Business Profile",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
const SizedBox(height: 15.0),
const SizedBox(height: 25.0),
MIHTextField(
controller: regController,
hintText: "Registration No.",
@@ -315,10 +316,11 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
const SizedBox(height: 15.0),
Divider(
color:
MzanziInnovationHub.of(context)?.theme.secondaryColor(),
color: MzanziInnovationHub.of(context)
?.theme
.secondaryColor(),
),
const SizedBox(height: 15.0),
//const SizedBox(height: 15.0),
const Text(
"My Business User:",
style: TextStyle(
@@ -326,7 +328,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
fontSize: 25,
),
),
const SizedBox(height: 15.0),
const SizedBox(height: 25.0),
MIHDropdownField(
controller: titleController,
hintText: "Title",
@@ -384,10 +386,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
height: 50.0,
child: MIHButton(
buttonText: "Add",
buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
buttonColor: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
onTap: () {
submitForm();
},
@@ -397,6 +401,20 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
),
),
),
Positioned(
top: 10,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
)
],
),
),
);
}

View File

@@ -3,8 +3,6 @@ import 'dart:convert';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:patient_manager/components/mihAppBar.dart';
//import 'package:patient_manager/components/mihAppDrawer.dart';
import 'package:patient_manager/components/popUpMessages/mihLoadingCircle.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
@@ -312,13 +310,15 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const MIHAppBar(
barTitle: "Business Profile",
propicFile: null,
),
// appBar: const MIHAppBar(
// barTitle: "Business Profile",
// propicFile: null,
// ),
//drawer: MIHAppDrawer(signedInUser: widget.arguments.signedInUser),
body: SafeArea(
child: KeyboardListener(
child: Stack(
children: [
KeyboardListener(
focusNode: _focusNode,
autofocus: true,
onKeyEvent: (event) async {
@@ -329,19 +329,19 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
}
},
child: SingleChildScrollView(
padding: EdgeInsets.all(25),
padding: const EdgeInsets.all(15),
child: Column(
children: [
Column(
children: [
const Text(
"Update Business Profile:",
"Business Profile",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
const SizedBox(height: 15.0),
const SizedBox(height: 25.0),
MIHTextField(
controller: regController,
hintText: "Registration No.",
@@ -409,15 +409,15 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
),
Column(
children: [
const SizedBox(height: 15.0),
//const SizedBox(height: 15.0),
const Text(
"My Business User:",
"My Business User",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
const SizedBox(height: 15.0),
const SizedBox(height: 25.0),
MIHDropdownField(
controller: titleController,
hintText: "Title",
@@ -493,6 +493,20 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
),
),
),
Positioned(
top: 10,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
)
],
),
),
);
}

View File

@@ -4,7 +4,6 @@ import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:patient_manager/components/inputsAndButtons/mihFileInput.dart';
import 'package:patient_manager/components/mihAppBar.dart';
import 'package:patient_manager/components/popUpMessages/mihLoadingCircle.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
import 'package:patient_manager/components/popUpMessages/mihSuccessMessage.dart';
@@ -258,13 +257,15 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const MIHAppBar(
barTitle: "Update Profile",
propicFile: null,
),
// appBar: const MIHAppBar(
// barTitle: "Update Profile",
// propicFile: null,
// ),
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
body: SafeArea(
child: Padding(
child: Stack(
children: [
Padding(
padding: const EdgeInsets.all(15.0),
child: Center(
child: KeyboardListener(
@@ -279,7 +280,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
child: Column(
children: [
const Text(
"Mzansi Profile:",
"Mzansi Profile",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
@@ -289,7 +290,8 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
FutureBuilder(
future: proPicUrl,
builder: (BuildContext context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.connectionState ==
ConnectionState.done) {
if (snapshot.hasData && snapshot.data != "") {
return Stack(
alignment: Alignment.center,
@@ -305,7 +307,8 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
SizedBox(
width: 110,
child: Image(
image: MzanziInnovationHub.of(context)!
image:
MzanziInnovationHub.of(context)!
.theme
.altLogoFrame()),
)
@@ -329,7 +332,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
}
},
),
const SizedBox(height: 10.0),
const SizedBox(height: 25.0),
MIHFileField(
controller: proPicController,
hintText: "Profile Picture",
@@ -407,17 +410,31 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
buttonColor: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
textColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(),
textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
onTap: () {
submitForm();
},
),
),
],
)),
),
),
Positioned(
top: 10,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
),
)
],
),
),
);