From b9e7bb3d397c4a04dc6e3bd7f1cb3d8f5eb22390 Mon Sep 17 00:00:00 2001 From: Aayush <aap409@usask.ca> Date: Fri, 4 Mar 2022 14:31:54 -0600 Subject: [PATCH] Homescreen Drawer --- lib/screens/home_screens/home_screen.dart | 105 +++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/lib/screens/home_screens/home_screen.dart b/lib/screens/home_screens/home_screen.dart index ea35e9f..70d3f5e 100644 --- a/lib/screens/home_screens/home_screen.dart +++ b/lib/screens/home_screens/home_screen.dart @@ -114,11 +114,114 @@ class HomeScreen extends StatelessWidget { ); } + Widget listTile({IconData icon, String title}) { + return ListTile( + leading: Icon( + icon, + size: 32, + ), + title: Text( + title, + style: TextStyle(color: Colors.black45), + ), + ); + } + @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Color(0xffcbcbcb), - drawer: Drawer(), + drawer: Drawer( + child: Container( + color: Color(0xffd1ad17), + child: ListView( + children: [ + DrawerHeader( + child: Row( + children: [ + CircleAvatar( + backgroundColor: Colors.white54, + radius: 43, + child: CircleAvatar( + radius: 40, + backgroundColor: Colors.red, + ), + ), + SizedBox( + width: 20, + ), + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text("Welcome Guest"), + SizedBox( + height: 7, + ), + Container( + height: 30, + child: OutlineButton( + onPressed: () {}, + child: Text("Login"), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15), + side: BorderSide( + width: 2, + ), + ), + ), + ), + ], + ) + ], + ), + ), + listTile(icon: Icons.home_outlined, title: "Home"), + listTile(icon: Icons.shop_outlined, title: "Review Cart"), + listTile(icon: Icons.person_outline, title: "My Profile"), + listTile(icon: Icons.notifications_outlined, title: "Notification"), + listTile(icon: Icons.star_outline, title: "Rating & Review"), + listTile(icon: Icons.favorite_outline, title: "Wishlist"), + listTile(icon: Icons.copy_outlined, title: "Complaints"), + listTile(icon: Icons.format_quote_outlined, title: "FAQs"), + Container( + height: 350, + padding: EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Contact Support"), + SizedBox( + height: 10, + ), + Row( + children: [ + Text("Call us:"), + SizedBox( + width: 10, + ), + Text("+1(306)638-250") + ], + ), + SizedBox( + height: 5, + ), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + Text("Mail us:"), + SizedBox( + width: 10, + ), + Text("abc@contoso.com") + ], + ), + ), + ], + )) + ], + ), + )), appBar: AppBar( iconTheme: IconThemeData(color: Colors.black), title: Text( -- GitLab