splash screen fix
This commit is contained in:
@@ -41,74 +41,14 @@ class _HomeTileState extends State<HomeTile> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget displayTile() {
|
// Widget displayTile() {
|
||||||
return FittedBox(
|
// return FittedBox(
|
||||||
child: Column(
|
// child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
// mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
// children: [
|
||||||
GestureDetector(
|
// GestureDetector(
|
||||||
onTap: widget.onTap,
|
// onTap: widget.onTap,
|
||||||
onTapDown: (_) {
|
|
||||||
setState(() {
|
|
||||||
mainC = MzanziInnovationHub.of(context)!.theme.primaryColor();
|
|
||||||
secondC =
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onTapUp: (_) {
|
|
||||||
setState(() {
|
|
||||||
mainC = MzanziInnovationHub.of(context)!.theme.secondaryColor();
|
|
||||||
secondC = MzanziInnovationHub.of(context)!.theme.primaryColor();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: const EdgeInsets.all(3.0),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: mainC,
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
//border: Border.all(color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), width: 1.0),
|
|
||||||
),
|
|
||||||
child: Icon(
|
|
||||||
widget.tileIcon,
|
|
||||||
color: secondC,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 1),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Flexible(
|
|
||||||
child: Text(
|
|
||||||
widget.tileName,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
softWrap: true,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
style: TextStyle(
|
|
||||||
color: mainC,
|
|
||||||
fontSize: 5.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.all(10.0),
|
|
||||||
child: FittedBox(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: widget.onTap,
|
|
||||||
// onTapDown: (_) {
|
// onTapDown: (_) {
|
||||||
// setState(() {
|
// setState(() {
|
||||||
// mainC = MzanziInnovationHub.of(context)!.theme.primaryColor();
|
// mainC = MzanziInnovationHub.of(context)!.theme.primaryColor();
|
||||||
@@ -122,19 +62,67 @@ class _HomeTileState extends State<HomeTile> {
|
|||||||
// secondC = MzanziInnovationHub.of(context)!.theme.primaryColor();
|
// secondC = MzanziInnovationHub.of(context)!.theme.primaryColor();
|
||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
|
// child: Container(
|
||||||
|
// padding: const EdgeInsets.all(3.0),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: mainC,
|
||||||
|
// borderRadius: BorderRadius.circular(10.0),
|
||||||
|
// //border: Border.all(color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), width: 1.0),
|
||||||
|
// ),
|
||||||
|
// child: Icon(
|
||||||
|
// widget.tileIcon,
|
||||||
|
// color: secondC,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 1),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// Flexible(
|
||||||
|
// child: Text(
|
||||||
|
// widget.tileName,
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// softWrap: true,
|
||||||
|
// overflow: TextOverflow.visible,
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: mainC,
|
||||||
|
// fontSize: 5.0,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: FittedBox(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Material(
|
||||||
|
color: mainC,
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: widget.onTap,
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
//highlightColor: secondC,
|
||||||
child: Ink(
|
child: Ink(
|
||||||
padding: const EdgeInsets.all(3.0),
|
padding: const EdgeInsets.all(3.0),
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: mainC,
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
//border: Border.all(color: MzanziInnovationHub.of(context)!.theme.secondaryColor(), width: 1.0),
|
|
||||||
),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
widget.tileIcon,
|
widget.tileIcon,
|
||||||
color: secondC,
|
color: secondC,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 1),
|
const SizedBox(height: 1),
|
||||||
Text(
|
Text(
|
||||||
widget.tileName,
|
widget.tileName,
|
||||||
@@ -149,46 +137,5 @@ class _HomeTileState extends State<HomeTile> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// child: Card(
|
|
||||||
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
// elevation: 20,
|
|
||||||
// child: Column(
|
|
||||||
// //mainAxisSize: MainAxisSize.min,
|
|
||||||
// children: [
|
|
||||||
// Expanded(
|
|
||||||
// child: ListTile(
|
|
||||||
// leading: Icon(
|
|
||||||
// widget.tileIcon,
|
|
||||||
// color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
// ),
|
|
||||||
// title: Text(
|
|
||||||
// widget.tileName,
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// subtitle: Text(
|
|
||||||
// widget.tileDescription,
|
|
||||||
// style: TextStyle(color: MzanziInnovationHub.of(context)!.theme.primaryColor()),
|
|
||||||
// )),
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// child: Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
// children: [
|
|
||||||
// Padding(
|
|
||||||
// padding: const EdgeInsets.symmetric(horizontal: 10),
|
|
||||||
// child: Icon(
|
|
||||||
// Icons.arrow_forward,
|
|
||||||
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_nav_bar/google_nav_bar.dart';
|
||||||
import 'package:patient_manager/components/homeTile.dart';
|
import 'package:patient_manager/components/homeTile.dart';
|
||||||
import 'package:patient_manager/components/mihAppBar.dart';
|
import 'package:patient_manager/components/mihAppBar.dart';
|
||||||
import 'package:patient_manager/components/mihAppDrawer.dart';
|
import 'package:patient_manager/components/mihAppDrawer.dart';
|
||||||
@@ -42,7 +43,12 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context)
|
Navigator.of(context)
|
||||||
.popAndPushNamed('/profile', arguments: widget.signedInUser);
|
.pushNamed('/profile', arguments: widget.signedInUser);
|
||||||
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
// '/profile',
|
||||||
|
// (route) => false,
|
||||||
|
// arguments: widget.signedInUser,
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
tileName: "Setup Profie",
|
tileName: "Setup Profie",
|
||||||
tileIcon: Icons.perm_identity,
|
tileIcon: Icons.perm_identity,
|
||||||
@@ -59,6 +65,11 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
'/business/add',
|
'/business/add',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
// '/business/add',
|
||||||
|
// (route) => false,
|
||||||
|
// arguments: widget.signedInUser,
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
tileName: "Setup Business",
|
tileName: "Setup Business",
|
||||||
tileIcon: Icons.add_business_outlined,
|
tileIcon: Icons.add_business_outlined,
|
||||||
@@ -70,9 +81,20 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
void setAppsPersonal(List<HomeTile> tileList) {
|
void setAppsPersonal(List<HomeTile> tileList) {
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).popAndPushNamed('/patient-profile',
|
Navigator.of(context).pushNamed('/patient-profile',
|
||||||
arguments: PatientViewArguments(
|
arguments: PatientViewArguments(
|
||||||
widget.signedInUser, null, null, null, "personal"));
|
widget.signedInUser, null, null, null, "personal"));
|
||||||
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
// '/patient-profile',
|
||||||
|
// (route) => false,
|
||||||
|
// arguments: PatientViewArguments(
|
||||||
|
// widget.signedInUser,
|
||||||
|
// null,
|
||||||
|
// null,
|
||||||
|
// null,
|
||||||
|
// "personal",
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
tileName: "Patient Profile",
|
tileName: "Patient Profile",
|
||||||
tileIcon: Icons.medication,
|
tileIcon: Icons.medication,
|
||||||
@@ -81,10 +103,15 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
));
|
));
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/patient-access-review',
|
'/patient-access-review',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
// '/patient-access-review',
|
||||||
|
// (route) => false,
|
||||||
|
// arguments: widget.signedInUser,
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
tileName: "Access Review",
|
tileName: "Access Review",
|
||||||
tileIcon: Icons.check_box_outlined,
|
tileIcon: Icons.check_box_outlined,
|
||||||
@@ -97,7 +124,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
if (widget.businessUser!.access == "Full") {
|
if (widget.businessUser!.access == "Full") {
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/business-profile',
|
'/business-profile',
|
||||||
arguments: BusinessArguments(
|
arguments: BusinessArguments(
|
||||||
widget.signedInUser,
|
widget.signedInUser,
|
||||||
@@ -105,6 +132,15 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
widget.business,
|
widget.business,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
// '/business-profile',
|
||||||
|
// (route) => false,
|
||||||
|
// arguments: BusinessArguments(
|
||||||
|
// widget.signedInUser,
|
||||||
|
// widget.businessUser,
|
||||||
|
// widget.business,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
tileName: "Business Profile",
|
tileName: "Business Profile",
|
||||||
tileIcon: Icons.business,
|
tileIcon: Icons.business,
|
||||||
@@ -115,7 +151,7 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
if (widget.business!.type == "Doctors Office") {
|
if (widget.business!.type == "Doctors Office") {
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/patient-manager',
|
'/patient-manager',
|
||||||
arguments: BusinessArguments(
|
arguments: BusinessArguments(
|
||||||
widget.signedInUser,
|
widget.signedInUser,
|
||||||
@@ -123,6 +159,15 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
widget.business,
|
widget.business,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
// '/patient-manager',
|
||||||
|
// (route) => false,
|
||||||
|
// arguments: BusinessArguments(
|
||||||
|
// widget.signedInUser,
|
||||||
|
// widget.businessUser,
|
||||||
|
// widget.business,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
tileName: "Manage Patient",
|
tileName: "Manage Patient",
|
||||||
tileIcon: Icons.medication,
|
tileIcon: Icons.medication,
|
||||||
@@ -150,10 +195,15 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
));
|
));
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/business/add',
|
'/business/add',
|
||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
// '/business/add',
|
||||||
|
// (route) => false,
|
||||||
|
// arguments: widget.signedInUser,
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
tileName: "Setup Bus - Dev",
|
tileName: "Setup Bus - Dev",
|
||||||
tileIcon: Icons.add_business_outlined,
|
tileIcon: Icons.add_business_outlined,
|
||||||
@@ -162,8 +212,13 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
));
|
));
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).popAndPushNamed('/patient-manager/add',
|
Navigator.of(context).pushNamed('/patient-manager/add',
|
||||||
arguments: widget.signedInUser);
|
arguments: widget.signedInUser);
|
||||||
|
// Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
// '/patient-manager/add',
|
||||||
|
// (route) => false,
|
||||||
|
// arguments: widget.signedInUser,
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
tileName: "Add Pat - Dev",
|
tileName: "Add Pat - Dev",
|
||||||
tileIcon: Icons.add_circle_outline,
|
tileIcon: Icons.add_circle_outline,
|
||||||
@@ -172,8 +227,13 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
));
|
));
|
||||||
tileList.add(HomeTile(
|
tileList.add(HomeTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context)
|
// Navigator.of(context)
|
||||||
.popAndPushNamed('/profile', arguments: widget.signedInUser);
|
// .popAndPushNamed('/profile', arguments: widget.signedInUser);
|
||||||
|
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
'/profile',
|
||||||
|
(route) => false,
|
||||||
|
arguments: widget.signedInUser,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
tileName: "Upd Prof - Dev",
|
tileName: "Upd Prof - Dev",
|
||||||
tileIcon: Icons.perm_identity,
|
tileIcon: Icons.perm_identity,
|
||||||
@@ -305,55 +365,72 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final Size size = MediaQuery.sizeOf(context);
|
||||||
|
final double width = size.width;
|
||||||
|
//final double height = size.height;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MIHAppBar(barTitle: "Mzansi Innovation\nHub"),
|
appBar: const MIHAppBar(barTitle: "Mzansi Innovation\nHub"),
|
||||||
drawer: MIHAppDrawer(
|
drawer: MIHAppDrawer(
|
||||||
signedInUser: widget.signedInUser,
|
signedInUser: widget.signedInUser,
|
||||||
),
|
),
|
||||||
body: Column(
|
body:
|
||||||
children: [
|
// Column(
|
||||||
Padding(
|
// children: [
|
||||||
padding: const EdgeInsets.only(top: 10.0, right: 15.0),
|
// Padding(
|
||||||
child: Row(
|
// padding: const EdgeInsets.only(top: 10.0, right: 15.0),
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
// child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
IconButton(
|
// children: [
|
||||||
onPressed: () {
|
// IconButton(
|
||||||
if (!businessUserSwitch) {
|
// onPressed: () {
|
||||||
setState(() {
|
// if (!businessUserSwitch) {
|
||||||
businessUserSwitch = true;
|
// setState(() {
|
||||||
_selectedIndex = 1;
|
// businessUserSwitch = true;
|
||||||
});
|
// _selectedIndex = 1;
|
||||||
} else {
|
// });
|
||||||
setState(() {
|
// } else {
|
||||||
businessUserSwitch = false;
|
// setState(() {
|
||||||
_selectedIndex = 0;
|
// businessUserSwitch = false;
|
||||||
});
|
// _selectedIndex = 0;
|
||||||
}
|
// });
|
||||||
},
|
// }
|
||||||
icon: const Icon(
|
// },
|
||||||
Icons.swap_horizontal_circle_outlined,
|
// icon: const Icon(
|
||||||
size: 35,
|
// Icons.swap_horizontal_circle_outlined,
|
||||||
|
// size: 35,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(
|
||||||
|
// height: 20,
|
||||||
|
// ),
|
||||||
|
// Text(
|
||||||
|
// getHeading(_selectedIndex),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// fontSize: 35.0,
|
||||||
|
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(
|
||||||
|
// height: 20,
|
||||||
|
// ),
|
||||||
|
//Expanded(
|
||||||
|
//child:
|
||||||
|
|
||||||
|
GridView.builder(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: width / 7,
|
||||||
|
right: width / 7,
|
||||||
|
//bottom: height / 5,
|
||||||
|
top: 20,
|
||||||
),
|
),
|
||||||
),
|
// physics: ,
|
||||||
],
|
// shrinkWrap: true,
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
getHeading(_selectedIndex),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 35.0,
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: GridView.builder(
|
|
||||||
itemCount: pbswitch[_selectedIndex].length,
|
itemCount: pbswitch[_selectedIndex].length,
|
||||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
maxCrossAxisExtent: 200),
|
maxCrossAxisExtent: 200),
|
||||||
@@ -361,47 +438,47 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
|||||||
return pbswitch[_selectedIndex][index];
|
return pbswitch[_selectedIndex][index];
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
// bottomNavigationBar: Visibility(
|
|
||||||
// visible: isBusinessUser(widget.signedInUser),
|
|
||||||
// child: Padding(
|
|
||||||
// padding: const EdgeInsets.all(15.0),
|
|
||||||
// child: GNav(
|
|
||||||
// //hoverColor: Colors.lightBlueAccent,
|
|
||||||
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
// iconSize: 35.0,
|
|
||||||
// activeColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
// tabBackgroundColor:
|
|
||||||
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
// //gap: 20,
|
|
||||||
// //padding: EdgeInsets.all(15),
|
|
||||||
// tabs: [
|
|
||||||
// GButton(
|
|
||||||
// icon: Icons.perm_identity,
|
|
||||||
// text: "Personal",
|
|
||||||
// onPressed: () {
|
|
||||||
// setState(() {
|
|
||||||
// _selectedIndex = 0;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// GButton(
|
|
||||||
// icon: Icons.business_center,
|
|
||||||
// text: "Business",
|
|
||||||
// onPressed: () {
|
|
||||||
// setState(() {
|
|
||||||
// _selectedIndex = 1;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
//),
|
//),
|
||||||
// ],
|
// ],
|
||||||
// selectedIndex: _selectedIndex,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
// ),
|
||||||
|
bottomNavigationBar: Visibility(
|
||||||
|
visible: isBusinessUser(widget.signedInUser),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15.0),
|
||||||
|
child: GNav(
|
||||||
|
//hoverColor: Colors.lightBlueAccent,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
iconSize: 35.0,
|
||||||
|
activeColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
tabBackgroundColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
//gap: 20,
|
||||||
|
//padding: EdgeInsets.all(15),
|
||||||
|
tabs: [
|
||||||
|
GButton(
|
||||||
|
icon: Icons.perm_identity,
|
||||||
|
text: "Personal",
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
GButton(
|
||||||
|
icon: Icons.business_center,
|
||||||
|
text: "Business",
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = 1;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
selectedIndex: _selectedIndex,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,17 +26,22 @@ class _MIHAppBarState extends State<MIHAppBar> {
|
|||||||
return AppBar(
|
return AppBar(
|
||||||
elevation: 8,
|
elevation: 8,
|
||||||
shadowColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
shadowColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
actions: [
|
// actions: [
|
||||||
IconButton(
|
// IconButton(
|
||||||
icon: const Icon(
|
// icon: const Icon(
|
||||||
Icons.home,
|
// Icons.home,
|
||||||
size: 40,
|
// size: 40,
|
||||||
),
|
// ),
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Navigator.popAndPushNamed(context, '/home');
|
// // Navigator.pushNamedAndRemoveUntil(
|
||||||
},
|
// // context,
|
||||||
)
|
// // '/home',
|
||||||
],
|
// // );
|
||||||
|
// Navigator.of(context)
|
||||||
|
// .pushNamedAndRemoveUntil('/home', (route) => false);
|
||||||
|
// },
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
title: Text(
|
title: Text(
|
||||||
widget.barTitle,
|
widget.barTitle,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
|||||||
@@ -138,7 +138,8 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.popAndPushNamed(context, '/home');
|
Navigator.of(context)
|
||||||
|
.pushNamedAndRemoveUntil('/home', (route) => false);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class _MihloadingcircleState extends State<Mihloadingcircle>
|
|||||||
ImageProvider loading =
|
ImageProvider loading =
|
||||||
MzanziInnovationHub.of(context)!.theme.loadingImage();
|
MzanziInnovationHub.of(context)!.theme.loadingImage();
|
||||||
return Dialog(
|
return Dialog(
|
||||||
|
//backgroundColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
width: 250,
|
width: 250,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ 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/mihAppBar.dart';
|
||||||
import 'package:patient_manager/components/mihAppDrawer.dart';
|
//import 'package:patient_manager/components/mihAppDrawer.dart';
|
||||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
import 'package:patient_manager/components/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';
|
||||||
@@ -268,7 +268,7 @@ class _PatientAccessRequestState extends State<PatientAccessRequest> {
|
|||||||
final screenHeight = MediaQuery.of(context).size.height;
|
final screenHeight = MediaQuery.of(context).size.height;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MIHAppBar(barTitle: "Access Reviews"),
|
appBar: const MIHAppBar(barTitle: "Access Reviews"),
|
||||||
drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
|
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
|
||||||
body: viewAccessRequest(screenWidth, screenHeight),
|
body: viewAccessRequest(screenWidth, screenHeight),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ 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/inputsAndButtons/mihDropdownInput.dart';
|
import 'package:patient_manager/components/inputsAndButtons/mihDropdownInput.dart';
|
||||||
import 'package:patient_manager/components/mihAppDrawer.dart';
|
//import 'package:patient_manager/components/mihAppDrawer.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';
|
||||||
import 'package:patient_manager/components/inputsAndButtons/mihTextInput.dart';
|
import 'package:patient_manager/components/inputsAndButtons/mihTextInput.dart';
|
||||||
@@ -344,7 +344,7 @@ class _AddPatientState extends State<AddPatient> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MIHAppBar(barTitle: "Add Patient"),
|
appBar: const MIHAppBar(barTitle: "Add Patient"),
|
||||||
drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
|
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
|
||||||
body: KeyboardListener(
|
body: KeyboardListener(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ 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/mihAppBar.dart';
|
||||||
import 'package:patient_manager/components/mihAppDrawer.dart';
|
//import 'package:patient_manager/components/mihAppDrawer.dart';
|
||||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
import 'package:patient_manager/components/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';
|
||||||
@@ -469,7 +469,7 @@ class _PatientManagerState extends State<PatientManager> {
|
|||||||
final screenHeight = MediaQuery.of(context).size.height;
|
final screenHeight = MediaQuery.of(context).size.height;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MIHAppBar(barTitle: "Patient Manager"),
|
appBar: const MIHAppBar(barTitle: "Patient Manager"),
|
||||||
drawer: MIHAppDrawer(signedInUser: widget.arguments.signedInUser),
|
//drawer: MIHAppDrawer(signedInUser: widget.arguments.signedInUser),
|
||||||
//floatingActionButtonLocation: FloatingActionButtonLocation.,
|
//floatingActionButtonLocation: FloatingActionButtonLocation.,
|
||||||
// floatingActionButton: FloatingActionButton.extended(
|
// floatingActionButton: FloatingActionButton.extended(
|
||||||
// label: Text(
|
// label: Text(
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class _PatientViewState extends State<PatientView> {
|
|||||||
// var logo = MzanziInnovationHub.of(context)!.theme.logoImage();
|
// var logo = MzanziInnovationHub.of(context)!.theme.logoImage();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MIHAppBar(barTitle: "Patient Profile"),
|
appBar: const MIHAppBar(barTitle: "Patient Profile"),
|
||||||
drawer: showDrawer(),
|
//drawer: showDrawer(),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0),
|
padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ 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/mihAppBar.dart';
|
||||||
import 'package:patient_manager/components/mihAppDrawer.dart';
|
//import 'package:patient_manager/components/mihAppDrawer.dart';
|
||||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
import 'package:patient_manager/components/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,7 +229,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MIHAppBar(barTitle: "Add Business"),
|
appBar: const MIHAppBar(barTitle: "Add Business"),
|
||||||
drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
|
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
|
||||||
body: KeyboardListener(
|
body: KeyboardListener(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ 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/mihAppBar.dart';
|
||||||
import 'package:patient_manager/components/mihAppDrawer.dart';
|
//import 'package:patient_manager/components/mihAppDrawer.dart';
|
||||||
import 'package:patient_manager/components/mihLoadingCircle.dart';
|
import 'package:patient_manager/components/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';
|
||||||
@@ -313,7 +313,7 @@ class _ProfileBusinessUpdateState extends State<ProfileBusinessUpdate> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MIHAppBar(barTitle: "Business Profile"),
|
appBar: const MIHAppBar(barTitle: "Business Profile"),
|
||||||
drawer: MIHAppDrawer(signedInUser: widget.arguments.signedInUser),
|
//drawer: MIHAppDrawer(signedInUser: widget.arguments.signedInUser),
|
||||||
body: KeyboardListener(
|
body: KeyboardListener(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ 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/mihAppBar.dart';
|
||||||
import 'package:patient_manager/components/mihAppDrawer.dart';
|
// import 'package:patient_manager/components/mihAppDrawer.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';
|
||||||
import 'package:patient_manager/components/inputsAndButtons/mihTextInput.dart';
|
import 'package:patient_manager/components/inputsAndButtons/mihTextInput.dart';
|
||||||
@@ -168,7 +168,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MIHAppBar(barTitle: "Update Profile"),
|
appBar: const MIHAppBar(barTitle: "Update Profile"),
|
||||||
drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
|
//drawer: MIHAppDrawer(signedInUser: widget.signedInUser),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(15.0),
|
padding: const EdgeInsets.all(15.0),
|
||||||
child: Center(
|
child: Center(
|
||||||
|
|||||||
@@ -118,11 +118,11 @@ class MyTheme {
|
|||||||
AssetImage loadingImage() {
|
AssetImage loadingImage() {
|
||||||
if (mode == "Dark") {
|
if (mode == "Dark") {
|
||||||
loading = const AssetImage(
|
loading = const AssetImage(
|
||||||
'images/loading_dark.gif',
|
'images/loading_light.gif',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
loading = const AssetImage(
|
loading = const AssetImage(
|
||||||
'images/loading_light.gif',
|
'images/loading_dark.gif',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return loading;
|
return loading;
|
||||||
|
|||||||
@@ -30,36 +30,14 @@
|
|||||||
<title>Mzansi Innovation Hub</title>
|
<title>Mzansi Innovation Hub</title>
|
||||||
<link rel="manifest" href="manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
<!-- <style>
|
<!-- <style>
|
||||||
.main {
|
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
background-color: #3A4454;
|
|
||||||
display: flex; /* Default Axis is X*/
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center; /* Main Axis */
|
|
||||||
align-items: center; /* Cross Axis */
|
|
||||||
|
|
||||||
}
|
|
||||||
.indicator{
|
|
||||||
width: 100px;
|
|
||||||
}
|
|
||||||
.writting{
|
|
||||||
font-size: 15px;
|
|
||||||
font-family: fantasy;
|
|
||||||
color: #bedcfe;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
padding-bottom: 3%
|
|
||||||
}
|
|
||||||
.bg{
|
.bg{
|
||||||
background-color: #3A4454;
|
background-color: #3A4454;
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
}
|
}
|
||||||
</style> -->
|
</style> -->
|
||||||
|
|
||||||
|
|
||||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
|
<!-- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"> -->
|
||||||
|
|
||||||
|
|
||||||
<style id="splash-screen-style">
|
<style id="splash-screen-style">
|
||||||
@@ -128,7 +106,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg">
|
<body>
|
||||||
<picture id="splash-branding">
|
<picture id="splash-branding">
|
||||||
<source srcset="splash/img/branding-1x.png 1x, splash/img/branding-2x.png 2x, splash/img/branding-3x.png 3x, splash/img/branding-4x.png 4x" media="(prefers-color-scheme: light)">
|
<source srcset="splash/img/branding-1x.png 1x, splash/img/branding-2x.png 2x, splash/img/branding-3x.png 3x, splash/img/branding-4x.png 4x" media="(prefers-color-scheme: light)">
|
||||||
<source srcset="splash/img/branding-dark-1x.png 1x, splash/img/branding-dark-2x.png 2x, splash/img/branding-dark-3x.png 3x, splash/img/branding-dark-4x.png 4x" media="(prefers-color-scheme: dark)">
|
<source srcset="splash/img/branding-dark-1x.png 1x, splash/img/branding-dark-2x.png 2x, splash/img/branding-dark-3x.png 3x, splash/img/branding-dark-4x.png 4x" media="(prefers-color-scheme: dark)">
|
||||||
@@ -163,7 +141,7 @@
|
|||||||
|
|
||||||
<!-- Versioning -->
|
<!-- Versioning -->
|
||||||
<script defer>
|
<script defer>
|
||||||
var serviceWorkerVersion = null;
|
var serviceWorkerVersion = '{{flutter_service_worker_version}}';
|
||||||
var scriptLoaded = false;
|
var scriptLoaded = false;
|
||||||
function loadMainDartJs() {
|
function loadMainDartJs() {
|
||||||
if (scriptLoaded) {
|
if (scriptLoaded) {
|
||||||
|
|||||||
Reference in New Issue
Block a user