From dae84bbb848d9235c7354e7a36aa04c36c29d5ea Mon Sep 17 00:00:00 2001
From: Aayush <aap409@usask.ca>
Date: Mon, 7 Mar 2022 22:36:11 -0600
Subject: [PATCH] commit all

---
 lib/screens/home_screens/drawer_side.dart     | 95 +++++++++++--------
 .../home_screens/my_profile/my_profile.dart   | 23 +++++
 2 files changed, 79 insertions(+), 39 deletions(-)
 create mode 100644 lib/screens/home_screens/my_profile/my_profile.dart

diff --git a/lib/screens/home_screens/drawer_side.dart b/lib/screens/home_screens/drawer_side.dart
index b7bdf3d..934976e 100644
--- a/lib/screens/home_screens/drawer_side.dart
+++ b/lib/screens/home_screens/drawer_side.dart
@@ -1,10 +1,13 @@
+import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
+import 'package:food_app/screens/home_screens/my_profile/my_profile.dart';
 
 import '../../config/colors.dart';
 
-class DrawerSide extends StatelessWidget{
-  Widget listTile({IconData iconData, String title}) {
+class DrawerSide extends StatelessWidget {
+  Widget listTile({IconData iconData, String title, Function onTap}) {
     return ListTile(
+      onTap: onTap,
       leading: Icon(
         iconData,
         size: 32,
@@ -22,7 +25,7 @@ class DrawerSide extends StatelessWidget{
       child: Container(
         width: 100,
         color: primaryColor,
-        child: ListView(          
+        child: ListView(
           children: [
             DrawerHeader(
               child: Row(
@@ -33,8 +36,7 @@ class DrawerSide extends StatelessWidget{
                     child: CircleAvatar(
                       backgroundColor: Colors.yellow,
                       backgroundImage: NetworkImage(
-                        "https://s3.envato.com/files/328957910/vegi_thumb.png"
-                      ),
+                          "https://s3.envato.com/files/328957910/vegi_thumb.png"),
                       radius: 40,
                     ),
                   ),
@@ -67,55 +69,70 @@ class DrawerSide extends StatelessWidget{
                 ],
               ),
             ),
-            listTile(iconData: Icons.home_outlined, title: "Home"),
+            listTile(
+              iconData: Icons.home_outlined,
+              title: "Home",
+            ),
             listTile(iconData: Icons.shop_outlined, title: "Review Cart"),
-            listTile(iconData: Icons.person_outline, title: "My Profile"),
-            listTile(iconData: Icons.notifications_outlined, title: "Notification"),
+            listTile(
+                iconData: Icons.person_outlined,
+                title: "My Profile",
+                onTap: () {
+                  Navigator.of(context).push(
+                    MaterialPageRoute(
+                      builder: (context) => MyProfile(),
+                    ),
+                  );
+                }),
+            listTile(
+                iconData: Icons.notifications_outlined, title: "Notification"),
             listTile(iconData: Icons.star_outline, title: "Rating & Review"),
             listTile(iconData: Icons.favorite_outline, title: "Wishlist"),
             listTile(iconData: Icons.copy_outlined, title: "Complaints"),
             listTile(iconData: 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(
+              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("Call us:"),
+                        Text("Mail us:"),
                         SizedBox(
                           width: 10,
                         ),
-                        Text("+1(306)638-250")
+                        Text(
+                          "abc@contoso.com",
+                          overflow: TextOverflow.ellipsis,
+                        ),
                       ],
                     ),
-                    SizedBox(
-                      height: 5,
-                    ),
-                    SingleChildScrollView(
-                      scrollDirection: Axis.horizontal,
-                      child: Row(
-                        children: [
-                          Text("Mail us:"),
-                          SizedBox(
-                            width: 10,
-                          ),
-                          Text("abc@contoso.com",overflow: TextOverflow.ellipsis,
-                          ),
-                        ],
-                      ),
-                    ),
-                  ],
-                ),
+                  ),
+                ],
               ),
+            ),
           ],
         ),
       ),
     );
   }
-}
\ No newline at end of file
+}
diff --git a/lib/screens/home_screens/my_profile/my_profile.dart b/lib/screens/home_screens/my_profile/my_profile.dart
new file mode 100644
index 0000000..8f51a5b
--- /dev/null
+++ b/lib/screens/home_screens/my_profile/my_profile.dart
@@ -0,0 +1,23 @@
+import 'package:flutter/material.dart';
+import 'package:food_app/config/colors.dart';
+import 'package:food_app/screens/home_screens/drawer_side.dart';
+
+class MyProfile extends StatelessWidget {
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      backgroundColor: primaryColor,
+      appBar: AppBar(
+        elevation: 0.0,
+        title: Text(
+          "My Profile",
+          style: TextStyle(
+            fontSize: 18,
+            color: textColor,
+          )
+        )
+      ),
+      drawer: DrawerSide(),
+    );
+  }
+}
-- 
GitLab