I wanted to install the package, but I can't find it anywhere. There is a sample code that I wanted to try out. Code is in this link. https://gallery.flutter.dev/#/demo/nav_drawer
Asked
Active
Viewed 113 times
1 Answers
0
This is actually not a package but the flutter widget itself called "Drawer" you can add it on the scaffold or anywhere in your app with this simple example. please visit this link it has a great live example also on below of the page. https://flutter.dev/docs/cookbook/design/drawer

Jahanzaib Khan
- 98
- 7
-
Thank you! I know it's part of drawer. I am confused that if I can use the thing directly. After I imported this thing, I cannot use it, it says Target of URI doesn't exist: 'package:flutter_gen/gen_l10n/gallery_localizations.dart'. – MMMMMM Aug 17 '21 at 12:17
-
You don't need to import something if that is built with flutter widgets. why are you importing that URI? you can get Drawer widget directly. can you explain more? do you need Drawer in your whole app like the button will be on top menu (appbar) and you can open the drawer anytime you want in any page you want right? – Jahanzaib Khan Aug 17 '21 at 12:31
-
The scaffold has a drawer property and you give Drawer widget to it i am pasting an example code below: – Jahanzaib Khan Aug 17 '21 at 12:32
-
https://medium.com/codechai/navigation-drawer-using-flutter-cc8a5cfcab90 Very simple tutorial. – Jahanzaib Khan Aug 17 '21 at 12:34
-
I want to add user name and user email in the drawer after someone log in, so I also need to add a login, and I hope they are connected. – MMMMMM Aug 17 '21 at 13:22
-
Heres: how you can do these: 1: Make and login/Signup page and i hope you know auth features of firestore or whatever you are using like api login etc. 2: Once a user login make a homepage.dart and in that dart return a scaffold with Drawer and Drawer can have multiple properties like items (<---items means it can be column too) make a column and in that column return the user name and email. – Jahanzaib Khan Aug 17 '21 at 14:42