Change made to cater to pass User email from home page.

This commit is contained in:
2024-04-07 13:29:01 +02:00
parent 15eeed1872
commit 0df2161879
4 changed files with 95 additions and 54 deletions

View File

@@ -32,19 +32,38 @@ class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(barTitle: "Mzanzi Innovation Hub"),
body: HomeTileGrid(),
drawer: FutureBuilder(
future: getUserEmail(),
builder: (contexts, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return MyAppDrawer(drawerTitle: useremail);
} else {
return Center(child: CircularProgressIndicator());
}
},
),
return FutureBuilder(
future: getUserEmail(),
builder: (contexts, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return Scaffold(
appBar: MyAppBar(barTitle: "Mzanzi Innovation Hub"),
drawer: MyAppDrawer(
drawerTitle: useremail,
),
body: HomeTileGrid(
userEmail: useremail,
),
);
} else {
return Center(child: CircularProgressIndicator());
}
},
);
// Scaffold(
// appBar: MyAppBar(barTitle: "Mzanzi Innovation Hub"),
// body: HomeTileGrid(),
// drawer: FutureBuilder(
// future: getUserEmail(),
// builder: (contexts, snapshot) {
// if (snapshot.connectionState == ConnectionState.done) {
// return MyAppDrawer(drawerTitle: useremail);
// } else {
// return Center(child: CircularProgressIndicator());
// }
// },
// ),
// );
}
}