Collapsible Sidebar and Navigation Drawer | Flutter UI

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 146

  • @rakshakedlaya8961
    @rakshakedlaya8961 2 года назад +2

    Thanks a lot! This is exactly what I wanted. That Stack trick was what I was looking for 😊

  • @dra11y
    @dra11y Год назад +1

    Thanks. See 27:42 for making it a sidebar (move from scaffold drawer: to a stack). Make sure to check accessibility (Semantics) with a screen reader when you do this.

  • @techbook5416
    @techbook5416 5 лет назад +4

    Yes many has to learn bloc pattern start as fast as u can from scratch will be loving it

    • @techieblossom
      @techieblossom  5 лет назад +1

      Could you please specify, what are your questions.. regarding Bloc. It will be helpful to create videos around that.

  • @ciandrapancho8716
    @ciandrapancho8716 2 года назад

    Thank you! this worked for me! You're a legend for sharing this to begginers!

  • @Madilsharief
    @Madilsharief 2 года назад

    Very well done. Thanks for your effort in making and sharing.

  • @bryangruesoo8971
    @bryangruesoo8971 4 года назад

    Thanks for the tutorial men, i like the way that you explain the things. I'm a begginer in these framework and with this video i understand more things about dart and flutter

  • @arniifitness
    @arniifitness 3 года назад +1

    Great content. I'm just starting to learn flutter. Very helpful!

  • @YasudaKeisuke
    @YasudaKeisuke 4 года назад

    Thank you!! This is exactly what I wanted!
    I changed the tiles works with the animated icons, so now my collapssing button has text!
    Flutter is amazing I've come to like it.

    • @haydenharley6782
      @haydenharley6782 3 года назад

      I dont mean to be offtopic but does anybody know of a trick to log back into an instagram account??
      I somehow forgot my login password. I would love any tricks you can offer me.

    • @jamiematthias2620
      @jamiematthias2620 3 года назад

      @Hayden Harley instablaster :)

    • @haydenharley6782
      @haydenharley6782 3 года назад

      @Jamie Matthias Thanks so much for your reply. I got to the site through google and im in the hacking process atm.
      Looks like it's gonna take a while so I will reply here later when my account password hopefully is recovered.

    • @haydenharley6782
      @haydenharley6782 3 года назад

      @Jamie Matthias It did the trick and I actually got access to my account again. Im so happy!
      Thank you so much you saved my ass !

    • @jamiematthias2620
      @jamiematthias2620 3 года назад

      @Hayden Harley Glad I could help :)

  • @YasinIlhan61
    @YasinIlhan61 5 лет назад +4

    Thanks amazing video. All of people asked Bloc videos. Yes if you can will be fine , You can do full app series ( like fly app but little bit complex) How we can use Bloc , How we can get data from api and use it every page with bloc pattern.
    Another seris must be with animations. You can create custom slider with animation.

    • @amonchowdhury3553
      @amonchowdhury3553 5 лет назад

      Yes, I also agree with @Yasin. That will be amazing.

  • @abhilashchandran3126
    @abhilashchandran3126 5 лет назад +1

    thanks a lot mate.. explainations are simple... and you helped me to build what I had in mind. Something similar to vscode actitivity bar..

  • @mohabmagdy4155
    @mohabmagdy4155 5 лет назад +3

    for those who want the icons to make actions here is a snippet of code that helps you to do that:
    Expanded(
    child: ListView.separated(
    itemBuilder: (context, counter) {
    return CollapsingListTile(
    title: navigationItems[counter].title,
    icon: navigationItems[counter].icon,
    animationController: _animationController,
    isSelected: currentSelectedIndex == counter,
    OnTap: () {
    setState(() {
    currentSelectedIndex = counter;
    // new added code :
    // the first if condition used to make the first icon clickable and so on for every added if condition
    if (currentSelectedIndex == 0) {
    Navigator.push(
    context,
    MaterialPageRoute(builder: (context) => Page1()),
    );
    }
    if (currentSelectedIndex == 1) {
    Navigator.push(
    context,
    MaterialPageRoute(builder: (context) => Page2()),
    );

  • @mrpakravian
    @mrpakravian 5 лет назад +2

    Another master piece
    With beautiful explanation
    Awasome

  • @abdelqaddos
    @abdelqaddos 5 лет назад +7

    thanks ,plz, Can you tell me where I can make Navigation for each button in drawer ex: navigate to another page

    • @ngonidzashemaphosa6749
      @ngonidzashemaphosa6749 4 года назад +2

      @@luismiguelmantilla2147 thank you ,thank you thank you very much.... you have helped me so much . I'm doing something like this for my final year project. thank you

  • @MrEvanrich
    @MrEvanrich 2 месяца назад

    wish this covered how to make the rest of the body resize based on the width of the drawer.

  • @x0x0x0x0x0ful
    @x0x0x0x0x0ful 4 года назад +1

    Looks great. Just want to point out that this is now possible with NavigationRail out of the box with Flutter.

    • @techieblossom
      @techieblossom  4 года назад

      Probably Yes. I did this 14 months back. Thanks.

  • @luluinkcreativa2518
    @luluinkcreativa2518 5 лет назад

    Just suscribed! keep going with this videos about flutter, they are very helpful and you too! Thank you very much!

  • @ojiepermana
    @ojiepermana 3 года назад

    excellent !!!, next please add sub menu or multi level menus please. thanks

  • @pushkarkumar3186
    @pushkarkumar3186 3 года назад

    Awesome

  • @muhammadashfaq913
    @muhammadashfaq913 5 лет назад

    Loved it . thanks bro. Keep it up

  • @battleGroundAce832
    @battleGroundAce832 3 года назад

    great video man.. just want to know how we can change different screens when we tap on items in drawer?

  • @bechir6011
    @bechir6011 5 лет назад

    amazing video

  • @ermac9900
    @ermac9900 5 лет назад +3

    How do I make it collapse from the start app?

    • @LuisOtvio
      @LuisOtvio 4 года назад

      You can access the "collapsing_list_tile_widget" file, that class is "CollapsingListTile" and, on initState, reverse widthAnimation begin->end and sizedBoxAnimation too. It's work fine to me =)

  • @fernandaguedes9976
    @fernandaguedes9976 5 лет назад +1

    Can you please show how to navigate to every screen! I’ve created all the pages but don’t know how to go to them :(

  • @emmanuelfache9949
    @emmanuelfache9949 5 лет назад +1

    Nice video. Thank you.

  • @jimmyfmedina
    @jimmyfmedina 5 лет назад

    excellent content, great channel, I am subscribed and I will follow what you post.

  • @AshishKumar-dl2mc
    @AshishKumar-dl2mc 4 года назад +1

    Can I add photo at the top

  • @rushiGentleMen
    @rushiGentleMen 5 лет назад

    Loved your video thanks

  • @amonchowdhury3553
    @amonchowdhury3553 5 лет назад

    Nice tutorial. Loved it

  • @shanbond007
    @shanbond007 3 года назад

    Hi..I am facing little problem, not regarding this video, this working perfectly with me, and thanks for uploading such a informative video.
    The Problem I ma facing might be easy with you, but it tool my 4 days. I have images for Facebook + twitter + instagram.
    OnTap it should ope Facebook App installed in mobile and get the page link which I coded.... I dont want any FB login screen or web view or open in browser, just open it in App.
    If you or any one can help me, I indeed....Thanks

  • @wonderwithlali6020
    @wonderwithlali6020 Год назад

    I have a setState error when i return collapsingListTile in the collapsing_navigation_drawer page. Pls help

  • @shuraboev9987
    @shuraboev9987 3 года назад

    Thanks

  • @wangjohn6480
    @wangjohn6480 3 года назад

    good

  • @tushar__og
    @tushar__og 5 лет назад +3

    How are we suppose to navigate through these option?????

    • @JLElizalde
      @JLElizalde 5 лет назад

      I think you can do it in "collapsing_navigation_drawer.dart"
      Line 56.
      Only write your code with "if-else" selecting different options for each row, using the "counter" .
      0 : Dashboard
      1: Errors, etc.

    • @techieblossom
      @techieblossom  5 лет назад

      Yes. You can use switch as well. But the idea is same.

    • @bilibubule
      @bilibubule 5 лет назад

      can you explain more about that please ? I don't understant the concept well

    • @jafarhashmi8844
      @jafarhashmi8844 4 года назад

      there is no way i try a lot but get nothing

    • @techieblossom
      @techieblossom  4 года назад +1

      I m doing it using bloc provider, creating another menu related UI where you can find navigation between pages as well.

  • @anuguprashanth5330
    @anuguprashanth5330 5 лет назад

    can you please make a videos on the best patterns to maintain the codebase of the app in flutter ????

  • @MegaAmafia
    @MegaAmafia 5 лет назад

    Cool tutorial keep it up

  • @ahkstudio1566
    @ahkstudio1566 3 года назад

    the drawer is open on start how to close it start?

  • @frankycrasto2834
    @frankycrasto2834 5 лет назад

    My andriod phone is not showing the animation please help me out

  • @ipalconsult7419
    @ipalconsult7419 5 лет назад +1

    Nice video i will like to get in touch

  • @tityseptiani8584
    @tityseptiani8584 5 лет назад

    I'll go with the people screaming about BLoC. Please make a tutorial about how to use bloc pattern with API (or mockedAPI, it's up to you really), and show how to create a Navigation Drawer based on the data received from the API. I've been experimenting with it, but it seems like the Drawer would not redraw after the data is received. So, it's always empty. You should keep up with you tutorials! Thanks

    • @techieblossom
      @techieblossom  5 лет назад

      I think your answer lies in this video ruclips.net/video/S2KmxzgsTwk/видео.html
      If you use Bloc pattern, there is no way your drawer will not update whenever there is a response from API.
      Let me know, if that doesn't work

    • @tityseptiani8584
      @tityseptiani8584 5 лет назад

      @@techieblossom Hey, thank you for reply! I've just subscribed to your channel because I think your contents are really nice and different from others! I have tried fixing my problem and it's fixed now, but I'm not sure if it's the best way to do it. If you have time to read this, then I'll be more than happy to hear your opinion for my approach. If not, then just keep making awesome videos :D.
      So, basically I have a page with an InheritedWidget. Inside it is a Scaffold widget and a drawer inside the Scaffold. I am calling a webservice right away when the page is showing and the response will be shown as a header on the drawer. From most of the bloc tutorials that I've seen, they are triggering/calling the bloc's method (that will call the API) from a user action (clicks, taps, etc). So I was confused of where to call the bloc's method inside the widget without any user action/trigger. at first I put it inside the build method of the widget, not working. Then I moved it to the initstate, but it's giving me errors. Then I ended up with using Future.delayed inside the build method, it calls the API, it updates the variable that holds the data using setState, and then the ui will update. But I feel like, this is not the right way to do it. I feel like I actually don't even need a bloc to make something like this, because I thought, when I use bloc and inheritedWidget, I wouldn't need to call the setState anymore to rebuild the whole widget tree. What do you think? Flutter is really new to me and at times it can get so frustrating dealing with simple things like this. lol

    • @techieblossom
      @techieblossom  5 лет назад

      Bloc constructor is the way to go here. Make api calls in the Bloc constructor. Use the instantiated Bloc by Blocprovider.of. yes don't use setstate of using Bloc. And it's not about how small or big the functionality is, it's about how easy it is to maintain ur code. Could u put your code on git and paste the link here. I will understand and try to emulate similar use case.. I have understood ur case
      Thanks for subscribing

    • @tityseptiani8584
      @tityseptiani8584 5 лет назад +1

      @@techieblossom gist.github.com/tyegah/ecd58d0539526becae4bd9a9b0c67f1b that's the gist for my codes. I've tried your suggestion by moving the API call to Bloc constructor, it gives me the same blank UI. it's not updating. Please guide me to the right path. lol.

  • @lollingx1
    @lollingx1 3 года назад

    Is it possible to change the menu icon on the appbar or at least the color? Thanks.

    • @techieblossom
      @techieblossom  3 года назад

      Yes. You can.
      If it's a icon, give the color.

  • @kaniaghanian6849
    @kaniaghanian6849 2 года назад

    thank you. but how can i add submenu for this?

  • @23001215
    @23001215 3 года назад

    I want to conditionally display the navigationBloc items. How do I do it?

    • @techieblossom
      @techieblossom  3 года назад

      Did I use Bloc in this video?
      Can you please elaborate?

  • @dalu_
    @dalu_ 5 лет назад

    What if you load the navigation items from http then build the list? Never mind, got it. setState to update state of success callback of promise

  • @jayasingh1527
    @jayasingh1527 4 года назад

    Thanks for making the plugin of collapsible navigation drawer. I have used this but i want to change the content of navigation item. How can i add my custom navigation items (i.e. title, icon and onTap) using the package (custom_navigation_drawer 0.0.1
    ).

    • @ngonidzashemaphosa6749
      @ngonidzashemaphosa6749 4 года назад

      hi did you manage to get the solution to navigate from page to page? I also need help

    • @techieblossom
      @techieblossom  4 года назад

      I have not made changes to plugin.
      But to add Navigation you can learn from here
      ruclips.net/video/oExw0U4U_UI/видео.html

  • @aytunch
    @aytunch 5 лет назад +1

    please use flutter_bloc package. its created by google. maybe you can show bloc+firestore

    • @techieblossom
      @techieblossom  5 лет назад +1

      Could you please specify, what are your questions.. regarding Bloc. It will be helpful to create videos around that.

    • @aytunch
      @aytunch 5 лет назад

      @@techieblossom As most of the people will, I want to integrate firebase to my app. But I don't want to have firebase calls made from the UI. Bloc is perfect for this. However instead of using naked stream/sinks I think we should use flutter_bloc which is maintained by google. It has much more capabilities. Maybe you can write a simple cloud function that runs periodically and show how to connect UI and bloc that listens to it:) just an idea. there is no example like that for flutter

    • @YasinIlhan61
      @YasinIlhan61 5 лет назад +1

      @@aytunch Hey mate, you are wrong flutter_bloc package is created by felix.angelov . If you mean only Bloc pattern yes it is created by Google.

  • @martlalrts
    @martlalrts 5 лет назад

    Sir, Thanks for great example.
    I want to do one more thing.
    I've made TabBarList & this Sidebar widget (exactly same with on your video) is a part of the tabBarList.
    whenever I click some of the tabBarList (changing page),
    selectedColor that I set is blowed out.
    how could I save the State...?

    • @martlalrts
      @martlalrts 5 лет назад

      I did it !!!! yay!!!!!
      the solution was : List.
      I built ListView's itembuilder by using the List type's list.
      and whenever onTap event is on, it checks bool type !
      I'm so glad .....loool

    • @דניאלראובן-ו8ה
      @דניאלראובן-ו8ה 5 лет назад

      Charlie T Hi can u send all the code please

    • @danielreuven1901
      @danielreuven1901 5 лет назад

      @@martlalrts j

  • @kameradotmy
    @kameradotmy 4 года назад

    can you create a login to this sidebar menu ?

  • @ratnapriya6106
    @ratnapriya6106 4 года назад

    I don't want to open sidebar always, so how to close it and add some condition on it?

    • @techieblossom
      @techieblossom  4 года назад +1

      Keep 3rd state variable other than open, close. You can use Enum.
      Can play with the width of sidebar to achieve this. I have explained in the video how you can alternatively use it as drawer which will be closed by default.

    • @ratnapriya6106
      @ratnapriya6106 4 года назад

      @@techieblossom let me check.

  • @vinit_poojary
    @vinit_poojary 5 лет назад

    hi I want this to unselect on start and how to put click function

  • @blenderup919
    @blenderup919 4 года назад +1

    Hello, how do I start menu minimized?

    • @LuisOtvio
      @LuisOtvio 4 года назад

      You can access the "collapsing_list_tile_widget" file, that class is "CollapsingListTile" and, on initState, reverse widthAnimation begin->end and sizedBoxAnimation too. It's work fine to me =)

  • @23001215
    @23001215 4 года назад

    I created the navigation drawer and used blocProvider for navigation, now I want to provide state to one of the pages that uses NavigationStates using pragmatic state management. How do I do it, any guidance would be much appreciated :)

    • @techieblossom
      @techieblossom  4 года назад

      You can get the Navigation Bloc instance by using BlocProvider.of(context).
      Also, if you don't know, you can use multiple BlocProviders.

    • @techieblossom
      @techieblossom  4 года назад

      Hi, can you see this video?
      Concept is same in this
      ruclips.net/video/v2-F6n7_gZA/видео.html
      Let me know if this answers your question.

  • @hugochrispessego
    @hugochrispessego 4 года назад +1

    Is it possible to create a submenu in this model of yours?

  • @drajan1762
    @drajan1762 5 лет назад

    hi bro i want to close my drawer from outside of the drawer widget pragmatically . I opened the drawer using _scaffoldkey.currentState.openDrawer , is there is any similar way to close the drawer ...???? if anyone knows the answer please help . Thanks in advance.

  • @vivekg8667
    @vivekg8667 4 года назад

    How to add a card view to a particular screen

  • @mustafasinankoca6439
    @mustafasinankoca6439 4 года назад

    Bro you Awesome :)

  • @saalty9170
    @saalty9170 4 года назад

    big thankies from mcspankies

  • @vivekjunghamal5730
    @vivekjunghamal5730 3 года назад

    hi how to give a navigation to each of them?

  • @saurabhbhatt4794
    @saurabhbhatt4794 4 года назад

    hey Techie thanks a lot for this video, I am using this for my Flutter Web Application.
    I am new into flutter so will you please tell me how to fixed at the vertical position and use this drawer without appbar and It should not overlay the entire page.

  • @victoryukaegbu
    @victoryukaegbu 3 года назад

    How do i give an ontap fuction to the options?

    • @techieblossom
      @techieblossom  3 года назад +1

      Wrap them with GestureDetector

    • @victoryukaegbu
      @victoryukaegbu 3 года назад

      @@techieblossom ive tried and it did not work, when i use the if-else on the navigator_drawer.dart how do i write it becuase this is what i did and it isint working
      if (counter = 0) {
      return MyBNav();
      }
      Thanks for your help Appricieted.

    • @victoryukaegbu
      @victoryukaegbu 3 года назад

      @@techieblossom i somewhat got it working with the navigation propriety but its not great thanks anyways will find my way on making it work

  • @jaserjsk
    @jaserjsk 4 года назад

    The app starts with the sidebar opened.
    What do I change to make it originaly closed ?

    • @techieblossom
      @techieblossom  4 года назад

      Use it as a drawer, as I have explained this scenario in the video

    • @jaserjsk
      @jaserjsk 4 года назад

      @@techieblossom I have done all the steps with you step by step in the video. I just started learning Flutter.
      I assume that I have to change the bool value to make the initial state of the sidebar collapsed.
      Please correct me if I'm wrong.

    • @techieblossom
      @techieblossom  4 года назад

      Yes, you will have to change bool value

  • @petscutest2055
    @petscutest2055 4 года назад

    how to navigate a page with we click on the menu?

    • @techieblossom
      @techieblossom  4 года назад

      By using Navigator.of(context).push
      techieblossom.com/flutter-navigation-between-widgets/

  • @vivekg8667
    @vivekg8667 4 года назад

    how to navigate from one page to another when we click on the icon in the sidebar

    • @nikhilkukreja8498
      @nikhilkukreja8498 4 года назад +1

      Using current index like 0 or 1 use Navigator

    • @victoryukaegbu
      @victoryukaegbu 3 года назад

      @@nikhilkukreja8498 how, where? ive tried i think im doing it wrong

  • @דניאלראובן-ו8ה
    @דניאלראובן-ו8ה 5 лет назад

    How can add onPress to Icons? I want the Drawer doing someting

    • @techieblossom
      @techieblossom  5 лет назад

      Wrap them in Inkwell or gesture deteector

  • @RodyDavis
    @RodyDavis 5 лет назад +1

    can you post the source code?

  • @blenderup919
    @blenderup919 4 года назад

    Uau, how do I create information within the menu?

    • @techieblossom
      @techieblossom  4 года назад +1

      ??

    • @blenderup919
      @blenderup919 4 года назад

      @@techieblossom My (dashboard) is empty. How do I put information, photo, etc.?

  • @wihandebeer1755
    @wihandebeer1755 5 лет назад +2

    Where can I get a hold of this code?

  • @ChedoTech
    @ChedoTech 5 лет назад

    very good work bro... can you share code ?

  • @sickdiet8290
    @sickdiet8290 5 лет назад

    plz work on wallpaper app parts because no one had done that on flutter even i can get help to make an wallpaper app plz dude make videos on wallpaper app

  • @oudarjyasensarma4199
    @oudarjyasensarma4199 5 лет назад

    Repo please?

  • @iSpamr
    @iSpamr 5 лет назад

    source please ?

  • @lovemv931
    @lovemv931 2 года назад

    Source code?

  • @GabrielRocha-up4zf
    @GabrielRocha-up4zf 5 лет назад

    i love you

  • @harshaddeo3460
    @harshaddeo3460 5 лет назад

    git hub link please

    • @techieblossom
      @techieblossom  5 лет назад

      Updated the description.
      There is a package also for this, that I created.

  • @Railwayviralvideos
    @Railwayviralvideos 4 года назад

    Make olx clone app in flutter

  • @YamiSekaiKH
    @YamiSekaiKH Год назад

    how can i keep it collapsing when it tablet size ?

    • @techieblossom
      @techieblossom  Год назад +1

      Use it as a drawer as explained in the video. Or checkout the commented code here - github.com/PrateekSharma1712/custom_navigation_drawer/blob/master/example/main.dart

    • @YamiSekaiKH
      @YamiSekaiKH Год назад

      thank sir, i want to change it animation from mini side to maximum it work but the text it overflows when i collapse it how can i fix it sir

    • @YamiSekaiKH
      @YamiSekaiKH Год назад

      the hide text it not work properly when i change collapsing_drawer animation from mini to maximum how can i fix it? i don’t want to use drawer sir

    • @techieblossom
      @techieblossom  Год назад +1

      I will give you solution. Give me a day or two.

    • @YamiSekaiKH
      @YamiSekaiKH Год назад

      @@techieblossom thank you so much sir.

  • @ishdorjidree7410
    @ishdorjidree7410 4 года назад

    Thanks