remove home, add policy and TOS and aling options to bottom
This commit is contained in:
@@ -109,21 +109,31 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
// MzanziInnovationHub.of(context)!.theme.logoImage().image, context);
|
// MzanziInnovationHub.of(context)!.theme.logoImage().image, context);
|
||||||
ImageProvider logoThemeSwitch =
|
ImageProvider logoThemeSwitch =
|
||||||
MzanziInnovationHub.of(context)!.theme.logoImage();
|
MzanziInnovationHub.of(context)!.theme.logoImage();
|
||||||
return Drawer(
|
return SafeArea(
|
||||||
|
child: Drawer(
|
||||||
//backgroundColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
//backgroundColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
child: Stack(children: [
|
child: LayoutBuilder(
|
||||||
ListView(
|
builder: (BuildContext context, BoxConstraints constraints) {
|
||||||
padding: EdgeInsets.zero,
|
return Stack(
|
||||||
|
//fit: StackFit.passthrough,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
// reverse: false,
|
||||||
|
// padding: EdgeInsets.zero,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
DrawerHeader(
|
DrawerHeader(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 400,
|
height: 400,
|
||||||
|
width: constraints.maxWidth,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
profilePictureLoaded,
|
profilePictureLoaded,
|
||||||
Text(
|
Text(
|
||||||
@@ -159,18 +169,50 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// ListTile(
|
||||||
|
// title: Row(
|
||||||
|
// mainAxisSize: MainAxisSize.max,
|
||||||
|
// children: [
|
||||||
|
// Icon(
|
||||||
|
// Icons.home_outlined,
|
||||||
|
// color:
|
||||||
|
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(width: 25.0),
|
||||||
|
// Text(
|
||||||
|
// "Home",
|
||||||
|
// style: TextStyle(
|
||||||
|
// //fontWeight: FontWeight.bold,
|
||||||
|
// color: MzanziInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// onTap: () {
|
||||||
|
// Navigator.of(context)
|
||||||
|
// .pushNamedAndRemoveUntil('/', (route) => false);
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Row(
|
title: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.home_outlined,
|
Icons.policy,
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 25.0),
|
const SizedBox(width: 25.0),
|
||||||
Text(
|
Text(
|
||||||
"Home",
|
"Privacy Policy",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
//fontWeight: FontWeight.bold,
|
//fontWeight: FontWeight.bold,
|
||||||
color: MzanziInnovationHub.of(context)!
|
color: MzanziInnovationHub.of(context)!
|
||||||
@@ -181,8 +223,39 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context)
|
Navigator.of(context).pushNamed(
|
||||||
.pushNamedAndRemoveUntil('/', (route) => false);
|
'/privacy-policy',
|
||||||
|
//arguments: widget.signedInUser,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
title: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.design_services_rounded,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 25.0),
|
||||||
|
Text(
|
||||||
|
"Terms of Service",
|
||||||
|
style: TextStyle(
|
||||||
|
//fontWeight: FontWeight.bold,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
'/terms-of-service',
|
||||||
|
//arguments: widget.signedInUser,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
@@ -191,8 +264,9 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.logout,
|
Icons.logout,
|
||||||
color:
|
color: MzanziInnovationHub.of(context)!
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 25.0),
|
const SizedBox(width: 25.0),
|
||||||
Text(
|
Text(
|
||||||
@@ -207,14 +281,19 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await SuperTokens.signOut(completionHandler: (error) {
|
await SuperTokens.signOut(
|
||||||
|
completionHandler: (error) {
|
||||||
//print(error);
|
//print(error);
|
||||||
});
|
});
|
||||||
if (await SuperTokens.doesSessionExist() == false) {
|
if (await SuperTokens.doesSessionExist() ==
|
||||||
|
false) {
|
||||||
Navigator.of(context).popAndPushNamed('/');
|
Navigator.of(context).popAndPushNamed('/');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@@ -225,13 +304,16 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
if (MzanziInnovationHub.of(context)?.theme.mode == "Dark") {
|
if (MzanziInnovationHub.of(context)?.theme.mode ==
|
||||||
|
"Dark") {
|
||||||
//darkm = !darkm;
|
//darkm = !darkm;
|
||||||
MzanziInnovationHub.of(context)!.changeTheme(ThemeMode.light);
|
MzanziInnovationHub.of(context)!
|
||||||
|
.changeTheme(ThemeMode.light);
|
||||||
//print("Dark Mode: $darkm");
|
//print("Dark Mode: $darkm");
|
||||||
} else {
|
} else {
|
||||||
//darkm = !darkm;
|
//darkm = !darkm;
|
||||||
MzanziInnovationHub.of(context)!.changeTheme(ThemeMode.dark);
|
MzanziInnovationHub.of(context)!
|
||||||
|
.changeTheme(ThemeMode.dark);
|
||||||
//print("Dark Mode: $darkm");
|
//print("Dark Mode: $darkm");
|
||||||
}
|
}
|
||||||
Navigator.of(context).popAndPushNamed('/');
|
Navigator.of(context).popAndPushNamed('/');
|
||||||
@@ -261,7 +343,11 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
),
|
),
|
||||||
]),
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user