Commit 9e121093 authored by P.Lalitha Manasa's avatar P.Lalitha Manasa

Updated UI of home.dart as a menu bar with few options like myprofile,...

Updated UI of home.dart as a menu bar with few options like myprofile, feedback, resolved and unresolved problems, logout
parent 3f7d651f
......@@ -15,10 +15,100 @@ class Home extends StatefulWidget {
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
final body = Container(
child:Image.asset('assets/post_a_problem.jpg'),
width: MediaQuery
.of(context)
.size
.width,
padding: EdgeInsets.all(28.0),
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
Colors.white,
Colors.white,
]),
),
);
return Scaffold(
appBar: AppBar(
title: Text('Home ${widget.user.email}'),
),
appBar: AppBar(title: Text("Home"),
),
body: body,
drawer: Drawer(
// Add a ListView to the drawer. This ensures the user can scroll
// through the options in the Drawer if there isn't enough vertical
// space to fit everything.
child: ListView(
// Important: Remove any padding from the ListView.
padding: EdgeInsets.zero,
children: <Widget>[
DrawerHeader(
child: Text('Drawer Header'),
decoration: BoxDecoration(
color: Colors.blue,
),
),
ListTile(
title: Text('My Profile'),
onTap: () {
// Update the state of the app
// ...
// Then close the drawer
Navigator.pop(context);
},
),
ListTile(
title: Text('My Problems'),
onTap: () {
// Update the state of the app
// ...
// Then close the drawer
Navigator.pop(context);
},
),
ListTile(
title: Text('Resolved Problems'),
onTap: () {
// Update the state of the app
// ...
// Then close the drawer
Navigator.pop(context);
},
),
ListTile(
title: Text('Unresolved Problems'),
onTap: () {
// Update the state of the app
// ...
// Then close the drawer
Navigator.pop(context);
},
),
ListTile(
title: Text('Feedback'),
onTap: () {
// Update the state of the app
// ...
// Then close the drawer
Navigator.pop(context);
},
),
ListTile(
title: Text('Logout'),
onTap: () {
// Update the state of the app
// ...
// Then close the drawer
Navigator.pop(context);
},
),
],
),
),
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment