How to create Navigation Drawer in Flutter App? (Android & IOS)

Поділитися
Вставка
  • Опубліковано 30 гру 2024

КОМЕНТАРІ •

  • @abbasataie3651
    @abbasataie3651 3 роки тому +3

    Thanks for sharing. Waiting for more lessons

    • @FlutterCool
      @FlutterCool  3 роки тому

      Thanks and you are most welcome so I am making new videos :)

  • @lpm76
    @lpm76 3 роки тому +3

    Amazing! This looks really clean

    • @FlutterCool
      @FlutterCool  3 роки тому

      Thanks and follow our channel for more videos :)

  • @someone35354
    @someone35354 2 роки тому +1

    Was there a shortcut you ran at 7:14 to convert the enum to list of menu items?

    • @FlutterCool
      @FlutterCool  2 роки тому +1

      No, I just copied from somewhere to take less time

  • @saisreekar6891
    @saisreekar6891 2 роки тому +1

    hey dev, can you explain what you did at @9:35? what is this new container class doing

    • @FlutterCool
      @FlutterCool  2 роки тому

      Thanks for your comment, just add the container variable in body 👍

  • @bone29-k8r
    @bone29-k8r 2 роки тому +1

    from line 90 to 107 at 7:49 and line 38 to 53 at 9:23 , can I use Switch Case? It works for me as I leave the default field as blank as we have no exception. Your code seems nice and clean, easy to understand and to immitate for beginners.

  • @AleazarJohnVillanueva
    @AleazarJohnVillanueva 8 місяців тому +1

    This will help a lot, thanks ✨️

  • @MohammedAminFEKKAR
    @MohammedAminFEKKAR 2 роки тому +1

    Navigator.pop(context); its not working for me / the error is in context , any solution??

    • @FlutterCool
      @FlutterCool  2 роки тому

      You need to pass the current context for it so you can share your error to yasinm289@gmail.com to solve it.

  • @LloydZyanRUy
    @LloydZyanRUy 3 роки тому +2

    The child: Icon(Icons.dashboard...) part has error to me. It say that the child parameter is undefined. Can you please help me?

    • @FlutterCool
      @FlutterCool  3 роки тому

      Can you share your code through email(yasinm289@gmail.com) to solve the issue?

    • @LloydZyanRUy
      @LloydZyanRUy 3 роки тому

      @@FlutterCool exactly the same code as you do. It's just the expanded part after that the child term is undefined

    • @LloydZyanRUy
      @LloydZyanRUy 3 роки тому

      Sent you an email bro hope you could help me

    • @FlutterCool
      @FlutterCool  3 роки тому

      Clean the project cache by running
      flutter clean cache
      Then invalidate caches / restart Android Studio or VS Code.

  • @onielbrea913
    @onielbrea913 3 роки тому

    Nunca habia visto esta forma de implementacion, muy increible todo, gracias Saludos desde Republica Dominicana >)

    • @FlutterCool
      @FlutterCool  3 роки тому +1

      Gracias por tu gran comentario, comparte y sigue nuestro canal :)

  • @amashaniriella4302
    @amashaniriella4302 3 роки тому +2

    please do all of these for one app. Make complete app by using Login, sign up, drwer menu and others.

    • @FlutterCool
      @FlutterCool  3 роки тому +1

      Thanks for your comment, I will do :)

  • @OmarMohamed-ge2zg
    @OmarMohamed-ge2zg Рік тому +1

    great work but i want to know how to make the drawer shows on other screens which is not on the drawer

    • @FlutterCool
      @FlutterCool  Рік тому

      I didn't get your question. can you give us more info to answer you the correct one?

  • @yasinmohammadi6322
    @yasinmohammadi6322 3 роки тому +1

    Wonderful! Great job 😊

  • @jamaalcham5913
    @jamaalcham5913 2 роки тому

    thanks for sharing you nice video. i have a question, how can i change from one screeen to another.. example in contact page i have a new button call new contact when i click it, it change the body content from contact page to new contact page?

    • @FlutterCool
      @FlutterCool  2 роки тому

      If you want to go to another screen you can use Navigator.push() and if you want to change the current page so just set new value for currentPage variable.

    • @jamaalcham5913
      @jamaalcham5913 2 роки тому

      ​@@FlutterCool yes will like to change the value of current page variable from another dart file

    • @FlutterCool
      @FlutterCool  2 роки тому

      You need to use one of state management for this

  • @sudhapriyashrivastava6808
    @sudhapriyashrivastava6808 2 роки тому +1

    Hi.How to take navigation drawer for text field? I am trying to draw ola clone app

    • @FlutterCool
      @FlutterCool  2 роки тому

      Add your text field inside your drawer.

  • @manash199
    @manash199 Рік тому +1

    "message": "The method 'MyHeaderDrawer' isn't defined for the type 'MyApp'.
    Try correcting the name to the name of an existing method, or defining a method name

    • @FlutterCool
      @FlutterCool  Рік тому +1

      I think you didn't create the MyHeaderDrawer class or didn't import it in the main page

    • @manashbarman5481
      @manashbarman5481 Рік тому +1

      @@FlutterCool Thankyou for replying

    • @FlutterCool
      @FlutterCool  Рік тому

      You're welcome

  • @denisejov8632
    @denisejov8632 Рік тому +1

    Thanks for the video! BTW you could use a switch instead of if-else statements, this will be shorter :)

    • @FlutterCool
      @FlutterCool  Рік тому

      welcome and yes I could use the switch but because of simplicity.

  • @cheneekayemozar9094
    @cheneekayemozar9094 2 роки тому +1

    navigator.pop(context);
    setState(()
    this one turns red on mine. please help

    • @FlutterCool
      @FlutterCool  2 роки тому

      Use setState before Navigator

    • @mustafeezkhan4180
      @mustafeezkhan4180 Рік тому +1

      @@FlutterCool still not working please help

    • @oostv000
      @oostv000 Рік тому

      Same problem here, changing the order with Navigator statement does not help.
      Error: The function setState isn' t undefined.
      Google search says: you cannot use setState outside stateful widget

    • @FlutterCool
      @FlutterCool  Рік тому

      Pls share your code via yasinm289@gmail.com to solve your problem.

  • @sreethasmeda1991
    @sreethasmeda1991 10 місяців тому

    Nice, thanks for sharing

  • @hekmaarous6227
    @hekmaarous6227 2 роки тому +1

    thank you so much

  • @ericksantos3037
    @ericksantos3037 2 роки тому +1

    how can i add an animation to this navigation?

    • @FlutterCool
      @FlutterCool  2 роки тому

      It is a normal drawer and doesn't has animation so if you want to add animation you can use another package from pub.dev website.

  • @ahmedsaeed5149
    @ahmedsaeed5149 3 роки тому +1

    Thank you!!! sir

  • @mhtech879
    @mhtech879 3 роки тому +1

    Great!

  • @samnangsokhornco2m168
    @samnangsokhornco2m168 Рік тому +1

    what is enum bro?

    • @FlutterCool
      @FlutterCool  Рік тому

      Enum stands for enumerated type, a type of data where only a set of predefined values exist. In Dart, Enum is simply a special kind of class used to represent a fixed number of constant values.

  • @yavuzgp
    @yavuzgp 3 роки тому

    hi dev. ı can't understant you in 7:14. what did you do?

    • @FlutterCool
      @FlutterCool  3 роки тому +1

      Add all the menus

    • @yavuzgp
      @yavuzgp 3 роки тому

      @@FlutterCool thank you so much 🙏

  • @cmustafasaeed1930
    @cmustafasaeed1930 Рік тому +1

    Instead of taking drawer section it's taking drawer selection

  • @ParasProgramming123
    @ParasProgramming123 Рік тому +1

    my image is not showing

    • @FlutterCool
      @FlutterCool  Рік тому +1

      Maybe you set the wrong path or you can share your code with us through this email yasinm289@gmail.com

  • @saboorhakimi9806
    @saboorhakimi9806 3 роки тому +2

    gr8

  • @abasilis
    @abasilis 2 роки тому

    Hi RapidTech, thanks for this awesome video, I am learning Flutter, and even though this video has more than a year, not sure why in the 7:41 after the variable currentPage is created, Flutter does not recognize it. It still says "Undefined name 'currentPage'." when I hover the mouse over the variable where "currentPage == DrawerSections.dashboard". My version of Flutter at this time is 2.5.3, I have not upgraded to version 3.0 yet.

    • @brikz3546
      @brikz3546 2 роки тому

      I had the exact same problem.. did u find a way?

    • @abasilis
      @abasilis 2 роки тому

      @@brikz3546 yes, I did solve it, I can't tell right now, but I can upload it to my github and send you the link for you to compare.

    • @FlutterCool
      @FlutterCool  2 роки тому

      @Arturo If you describe your solution here, it will help others.

    • @abasilis
      @abasilis 2 роки тому

      @@brikz3546 Hi Brikz, I do not know what happened, I did reply two days ago. Anyway, it looks like the scope of the variable currentPage does not reach the MyDrawerList() widget, so, what I did was create the variable inside de MyDrawerList() widget.

    • @abasilis
      @abasilis 2 роки тому +1

      @@FlutterCool Thank you for your comment, it looks like UA-cam blocks my comment because I put the Github link. I have replied twice, anyway, what I did create the variable inside de MyDrawerList() widget, because it looks like it was out of scope, and it was not recognized.

  • @YousefAboAnNour
    @YousefAboAnNour 2 роки тому

    Thank you

  • @cmustafasaeed1930
    @cmustafasaeed1930 Рік тому +1

    One issue is occurring