How to close the scaffolding box after the point?

After I touch an item in the Forest drawer, I want it to auto-hide. How do I do this in Flutter?

+3


source to share


3 answers


Navigator.pop () will pop the route Drawer

from the stack and close it.



+5


source


Navigator.of(context).pop()

should do what you want :)



https://docs.flutter.io/flutter/widgets/Navigator-class.html https://docs.flutter.io/flutter/material/Drawer-class.html

+5


source


For the latest version of Flutter (v0.3.2 as I write this), the implementation has changed a bit and Navigator.pop()

now requires a given context.

Navigator.pop (context) is a typical use for closing a route.
Navigator.pop (context, true ) is use to close the route with the returned result.

See Drawer Class and Flutter Example Cookbook.

0


source







All Articles