drawer property Null safety
final
A panel displayed to the side of the body, often hidden on mobile devices. Swipes in from either left-to-right (TextDirection.ltr) or right-to-left (TextDirection.rtl)
Typically a Drawer.
To open the drawer, use the ScaffoldState.openDrawer function.
To close the drawer, use either ScaffoldState.closeDrawer, Navigator.pop or press the escape key on the keyboard.
To disable the drawer edge swipe on mobile, set the
Scaffold.drawerEnableOpenDragGesture to false. Then, use
ScaffoldState.openDrawer to open the drawer and Navigator.pop to close
it.
To create a local project with this code sample, run:
flutter create --sample=material.Scaffold.drawer.1 mysample
flutter create --sample=material.Scaffold.drawer.1 mysample
Implementation
final Widget? drawer;