How to create slide menu or drawer in flutter.



Drawer in flutter, it's old and very easy to integrate. Because you may be found so many tutorials on this topic.

So don't west much time for explanation or theory. But for iOS user might be found issue in swipe to navigation back page after click on menu item.

Instead of use below code in onTap() Method of ListTile



onTap: () {
  Navigator.pop(ctxt);
  Navigator.push(ctxt, new MaterialPageRoute(builder: (ctxt) => new FirstPage()));
}

Use pushReplacement in onTap().


onTap: () {
  Navigator.pushReplacement(ctxt, new MaterialPageRoute(builder: (ctxt) => new FirstPage()));
}
For more information about pushReplacement.


Please Click Here to download source code.





5 comments:

  1. Use this diet hack to drop 2 lb of fat in just 8 hours

    At least 160000 men and women are losing weight with a easy and secret "water hack" to drop 2lbs each and every night in their sleep.

    It's proven and it works on anybody.

    Here's how you can do it yourself:

    1) Grab a clear glass and fill it up half full

    2) And now do this weight loss HACK

    and become 2lbs thinner when you wake up!

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. The blog post you shared provides a helpful tutorial on creating a slide menu or drawer in Flutter. The step-by-step instructions and code snippets make it easy to follow along and implement this functionality in Flutter projects. A valuable resource for Flutter developers looking to add a slide menu to their apps. Thank you for sharing, If you want to Hire the Best Flutter App Developers from India, please contact us, and we will be happy to help you.

      Delete