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:flutter/material.dart';
import 'package:patient_manager/components/builders/buildAccessRequestList.dart'; import 'package:patient_manager/components/builders/buildAccessRequestList.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.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/components/popUpMessages/mihLoadingCircle.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/main.dart';
@@ -103,7 +101,7 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
); );
} }
return Container( return Container(
//height: 500, height: 500,
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),
@@ -131,28 +129,14 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
height: 600, height: 600,
child: Column(mainAxisSize: MainAxisSize.max, children: [ child: Column(mainAxisSize: MainAxisSize.max, children: [
//const SizedBox(height: 15), //const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
//const SizedBox(height: 25),
const Text( const Text(
"Access Request", "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( SizedBox(
width: 500, width: 500,
child: MIHDropdownField( child: MIHDropdownField(
@@ -169,7 +153,8 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
builder: (context, snapshot) { builder: (context, snapshot) {
//print("patient Queue List ${snapshot.hasData}"); //print("patient Queue List ${snapshot.hasData}");
if (snapshot.connectionState == ConnectionState.waiting) { if (snapshot.connectionState == ConnectionState.waiting) {
return Container( return Expanded(
child: Container(
//height: 500, //height: 500,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color:
@@ -182,6 +167,7 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
width: 3.0), width: 3.0),
), ),
child: const Mihloadingcircle(), child: const Mihloadingcircle(),
),
); );
} else if (snapshot.connectionState == ConnectionState.done) { } else if (snapshot.connectionState == ConnectionState.done) {
List<AccessRequest> accessRequestList; List<AccessRequest> accessRequestList;
@@ -267,12 +253,47 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
final screenWidth = MediaQuery.of(context).size.width; final screenWidth = MediaQuery.of(context).size.width;
final screenHeight = MediaQuery.of(context).size.height; final screenHeight = MediaQuery.of(context).size.height;
return Scaffold( return Scaffold(
appBar: const MIHAppBar( // appBar: const MIHAppBar(
barTitle: "Access Reviews", // barTitle: "Access Reviews",
propicFile: null, // propicFile: null,
), // ),
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser), //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/main.dart';
import 'package:patient_manager/objects/appUser.dart'; import 'package:patient_manager/objects/appUser.dart';
import 'package:patient_manager/objects/arguments.dart'; import 'package:patient_manager/objects/arguments.dart';
import '../components/mihAppBar.dart';
import 'package:supertokens_flutter/http.dart' as http; import 'package:supertokens_flutter/http.dart' as http;
class AddPatient extends StatefulWidget { class AddPatient extends StatefulWidget {
@@ -160,7 +159,7 @@ class _AddPatientState extends State<AddPatient> {
Widget displayForm() { Widget displayForm() {
return SingleChildScrollView( return SingleChildScrollView(
padding: const EdgeInsets.all(25.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
children: [ children: [
Text( Text(
@@ -172,7 +171,7 @@ class _AddPatientState extends State<AddPatient> {
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
), ),
), ),
const SizedBox(height: 10.0), const SizedBox(height: 25.0),
MIHTextField( MIHTextField(
controller: idController, controller: idController,
hintText: "13 digit ID Number or Passport", hintText: "13 digit ID Number or Passport",
@@ -343,13 +342,15 @@ class _AddPatientState extends State<AddPatient> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: const MIHAppBar( // appBar: const MIHAppBar(
barTitle: "Add Patient", // barTitle: "Add Patient",
propicFile: null, // propicFile: null,
), // ),
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser), //drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
body: SafeArea( body: SafeArea(
child: KeyboardListener( child: Stack(
children: [
KeyboardListener(
focusNode: _focusNode, focusNode: _focusNode,
autofocus: true, autofocus: true,
onKeyEvent: (event) async { onKeyEvent: (event) async {
@@ -360,6 +361,20 @@ class _AddPatientState extends State<AddPatient> {
}, },
child: displayForm(), 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/material.dart';
import 'package:flutter/services.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/inputsAndButtons/mihDropdownInput.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart'; import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
import 'package:patient_manager/components/popUpMessages/mihSuccessMessage.dart'; import 'package:patient_manager/components/popUpMessages/mihSuccessMessage.dart';
@@ -367,11 +366,8 @@ class _EditPatientState extends State<EditPatient> {
Widget displayForm() { Widget displayForm() {
return SingleChildScrollView( return SingleChildScrollView(
padding: const EdgeInsets.all(25.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
"Personal Details", "Personal Details",
@@ -379,21 +375,10 @@ class _EditPatientState extends State<EditPatient> {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 25.0, fontSize: 25.0,
color:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
IconButton(
icon: const Icon(Icons.delete),
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
alignment: Alignment.topRight,
onPressed: () {
deletePatientPopUp();
},
)
],
), ),
const SizedBox(height: 10.0), ),
const SizedBox(height: 25.0),
MIHTextField( MIHTextField(
controller: idController, controller: idController,
hintText: "13 digit ID Number or Passport", hintText: "13 digit ID Number or Passport",
@@ -608,12 +593,14 @@ class _EditPatientState extends State<EditPatient> {
}); });
return Scaffold( return Scaffold(
appBar: const MIHAppBar( // appBar: const MIHAppBar(
barTitle: "Edit Patient", // barTitle: "Edit Patient",
propicFile: null, // propicFile: null,
), // ),
body: SafeArea( body: SafeArea(
child: KeyboardListener( child: Stack(
children: [
KeyboardListener(
focusNode: _focusNode, focusNode: _focusNode,
autofocus: true, autofocus: true,
onKeyEvent: (event) async { onKeyEvent: (event) async {
@@ -624,6 +611,34 @@ class _EditPatientState extends State<EditPatient> {
}, },
child: displayForm(), 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:flutter/services.dart';
import 'package:patient_manager/components/builders/buildPatientList.dart'; import 'package:patient_manager/components/builders/buildPatientList.dart';
import 'package:patient_manager/components/builders/buildPatientQueueList.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/popUpMessages/mihLoadingCircle.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDateInput.dart'; import 'package:patient_manager/components/inputsAndButtons/mihDateInput.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart'; import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
@@ -309,23 +307,10 @@ class _PatientManagerState extends State<PatientManager> {
height: h - 157, height: h - 157,
child: Column(mainAxisSize: MainAxisSize.max, children: [ child: Column(mainAxisSize: MainAxisSize.max, children: [
//const SizedBox(height: 15), //const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const Text( const Text(
"Waiting Room", "Waiting Room",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
), ),
IconButton(
onPressed: () {
refreshQueue();
},
icon: const Icon(
Icons.refresh,
))
],
),
const SizedBox(height: 10), const SizedBox(height: 10),
MIHDateField( MIHDateField(
controller: queueDateController, controller: queueDateController,
@@ -478,34 +463,17 @@ class _PatientManagerState extends State<PatientManager> {
final screenWidth = MediaQuery.of(context).size.width; final screenWidth = MediaQuery.of(context).size.width;
final screenHeight = MediaQuery.of(context).size.height; final screenHeight = MediaQuery.of(context).size.height;
return Scaffold( return Scaffold(
appBar: const MIHAppBar( // appBar: const MIHAppBar(
barTitle: "Patient Manager", // barTitle: "Patient Manager",
propicFile: null, // 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(),
// ), // ),
// ), body: Stack(
// //backgroundColor: Colors.blueAccent, children: [
// onPressed: () { Column(
// Navigator.of(context).pushNamed('/patient-manager/add',
// arguments: widget.signedInUser.email);
// },
// icon: Icon(
// Icons.add,
// color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
// ),
// ),
body: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
const SizedBox(height: 5),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
@@ -532,6 +500,15 @@ class _PatientManagerState extends State<PatientManager> {
size: 35, size: 35,
), ),
), ),
IconButton(
onPressed: () {
refreshQueue();
},
icon: const Icon(
Icons.refresh,
size: 35,
),
),
], ],
), ),
Padding( 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:flutter/material.dart';
import 'package:patient_manager/components/mihAppDrawer.dart'; import 'package:patient_manager/components/mihAppDrawer.dart';
import 'package:patient_manager/components/patientDetails.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/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';
@@ -96,16 +95,18 @@ class _PatientViewState extends State<PatientView> {
// loadImage(); // loadImage();
// var logo = MzanziInnovationHub.of(context)!.theme.logoImage(); // var logo = MzanziInnovationHub.of(context)!.theme.logoImage();
return Scaffold( return Scaffold(
appBar: const MIHAppBar( // appBar: const MIHAppBar(
barTitle: "Patient Profile", // barTitle: "Patient Profile",
propicFile: null, // propicFile: null,
), // ),
//drawer: showDrawer(), //drawer: showDrawer(),
body: SafeArea( body: SafeArea(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Stack(
padding: children: [
const EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0), Padding(
padding: const EdgeInsets.symmetric(
vertical: 10.0, horizontal: 15.0),
child: Column( child: Column(
children: [ children: [
Row( Row(
@@ -148,12 +149,26 @@ class _PatientViewState extends State<PatientView> {
], ],
), ),
const SizedBox( const SizedBox(
height: 10.0, height: 25.0,
), ),
showSelection(_selectedIndex), 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/material.dart';
import 'package:flutter/services.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/popUpMessages/mihLoadingCircle.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart'; import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart'; import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
@@ -229,13 +227,15 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: const MIHAppBar( // appBar: const MIHAppBar(
barTitle: "Add Business", // barTitle: "Add Business",
propicFile: null, // propicFile: null,
), // ),
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser), //drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
body: SafeArea( body: SafeArea(
child: KeyboardListener( child: Stack(
children: [
KeyboardListener(
focusNode: _focusNode, focusNode: _focusNode,
autofocus: true, autofocus: true,
onKeyEvent: (event) async { onKeyEvent: (event) async {
@@ -245,17 +245,18 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
} }
}, },
child: SingleChildScrollView( child: SingleChildScrollView(
padding: EdgeInsets.all(25), padding: const EdgeInsets.all(15),
child: Column( child: Column(
children: [ children: [
//const SizedBox(height: 15),
const Text( const Text(
"Add Business Profile:", "Add Business Profile",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 25, fontSize: 25,
), ),
), ),
const SizedBox(height: 15.0), const SizedBox(height: 25.0),
MIHTextField( MIHTextField(
controller: regController, controller: regController,
hintText: "Registration No.", hintText: "Registration No.",
@@ -315,10 +316,11 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
), ),
const SizedBox(height: 15.0), const SizedBox(height: 15.0),
Divider( Divider(
color: color: MzanziInnovationHub.of(context)
MzanziInnovationHub.of(context)?.theme.secondaryColor(), ?.theme
.secondaryColor(),
), ),
const SizedBox(height: 15.0), //const SizedBox(height: 15.0),
const Text( const Text(
"My Business User:", "My Business User:",
style: TextStyle( style: TextStyle(
@@ -326,7 +328,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
fontSize: 25, fontSize: 25,
), ),
), ),
const SizedBox(height: 15.0), const SizedBox(height: 25.0),
MIHDropdownField( MIHDropdownField(
controller: titleController, controller: titleController,
hintText: "Title", hintText: "Title",
@@ -384,10 +386,12 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
height: 50.0, height: 50.0,
child: MIHButton( child: MIHButton(
buttonText: "Add", buttonText: "Add",
buttonColor: buttonColor: MzanziInnovationHub.of(context)!
MzanziInnovationHub.of(context)!.theme.secondaryColor(), .theme
textColor: .secondaryColor(),
MzanziInnovationHub.of(context)!.theme.primaryColor(), textColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
onTap: () { onTap: () {
submitForm(); 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:file_picker/file_picker.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.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/popUpMessages/mihLoadingCircle.dart';
import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart'; import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart'; import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
@@ -312,13 +310,15 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: const MIHAppBar( // appBar: const MIHAppBar(
barTitle: "Business Profile", // barTitle: "Business Profile",
propicFile: null, // propicFile: null,
), // ),
//drawer: MIHAppDrawer(signedInUser: widget.arguments.signedInUser), //drawer: MIHAppDrawer(signedInUser: widget.arguments.signedInUser),
body: SafeArea( body: SafeArea(
child: KeyboardListener( child: Stack(
children: [
KeyboardListener(
focusNode: _focusNode, focusNode: _focusNode,
autofocus: true, autofocus: true,
onKeyEvent: (event) async { onKeyEvent: (event) async {
@@ -329,19 +329,19 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
} }
}, },
child: SingleChildScrollView( child: SingleChildScrollView(
padding: EdgeInsets.all(25), padding: const EdgeInsets.all(15),
child: Column( child: Column(
children: [ children: [
Column( Column(
children: [ children: [
const Text( const Text(
"Update Business Profile:", "Business Profile",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 25, fontSize: 25,
), ),
), ),
const SizedBox(height: 15.0), const SizedBox(height: 25.0),
MIHTextField( MIHTextField(
controller: regController, controller: regController,
hintText: "Registration No.", hintText: "Registration No.",
@@ -409,15 +409,15 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
), ),
Column( Column(
children: [ children: [
const SizedBox(height: 15.0), //const SizedBox(height: 15.0),
const Text( const Text(
"My Business User:", "My Business User",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 25, fontSize: 25,
), ),
), ),
const SizedBox(height: 15.0), const SizedBox(height: 25.0),
MIHDropdownField( MIHDropdownField(
controller: titleController, controller: titleController,
hintText: "Title", 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/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:patient_manager/components/inputsAndButtons/mihFileInput.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/mihLoadingCircle.dart';
import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart'; import 'package:patient_manager/components/popUpMessages/mihErrorMessage.dart';
import 'package:patient_manager/components/popUpMessages/mihSuccessMessage.dart'; import 'package:patient_manager/components/popUpMessages/mihSuccessMessage.dart';
@@ -258,13 +257,15 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: const MIHAppBar( // appBar: const MIHAppBar(
barTitle: "Update Profile", // barTitle: "Update Profile",
propicFile: null, // propicFile: null,
), // ),
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser), //drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
body: SafeArea( body: SafeArea(
child: Padding( child: Stack(
children: [
Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Center( child: Center(
child: KeyboardListener( child: KeyboardListener(
@@ -279,7 +280,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
child: Column( child: Column(
children: [ children: [
const Text( const Text(
"Mzansi Profile:", "Mzansi Profile",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 25, fontSize: 25,
@@ -289,7 +290,8 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
FutureBuilder( FutureBuilder(
future: proPicUrl, future: proPicUrl,
builder: (BuildContext context, snapshot) { builder: (BuildContext context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) { if (snapshot.connectionState ==
ConnectionState.done) {
if (snapshot.hasData && snapshot.data != "") { if (snapshot.hasData && snapshot.data != "") {
return Stack( return Stack(
alignment: Alignment.center, alignment: Alignment.center,
@@ -305,7 +307,8 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
SizedBox( SizedBox(
width: 110, width: 110,
child: Image( child: Image(
image: MzanziInnovationHub.of(context)! image:
MzanziInnovationHub.of(context)!
.theme .theme
.altLogoFrame()), .altLogoFrame()),
) )
@@ -329,7 +332,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
} }
}, },
), ),
const SizedBox(height: 10.0), const SizedBox(height: 25.0),
MIHFileField( MIHFileField(
controller: proPicController, controller: proPicController,
hintText: "Profile Picture", hintText: "Profile Picture",
@@ -407,17 +410,31 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .secondaryColor(),
textColor: textColor: MzanziInnovationHub.of(context)!
MzanziInnovationHub.of(context)!.theme.primaryColor(), .theme
.primaryColor(),
onTap: () { onTap: () {
submitForm(); submitForm();
}, },
), ),
), ),
], ],
)),
), ),
), ),
Positioned(
top: 10,
left: 5,
width: 50,
height: 50,
child: IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: const Icon(Icons.arrow_back),
), ),
)
],
), ),
), ),
); );