Search code examples
flutterflutter-navigation

Create a menu on flutter that close with Navigator.pop()


I want to create a custom menu, just like the drawer but opened from the bottom. The problem is that I want to be able to close it with the Navigator.pop() and when the user use the back button.
Handle the back button is is possible in flutter but I prefer to learn how to create that menus. Just like a menu created with Navigator.push but with a transparent background that lets you see the previous route and with a slidable action to open and close it.
In conclusion similar to a normal drawer in the way it open and close but implemented on a custom menu.


Solution

  • you can use Botton Sheets, they come from the bottom, you can resize and customize it as you need and it closes with Navigator.pop