I've seem examples on how to set up a drawer in Flutter (return new Scaffold(drawer: new Drawer( ... )
or return new Scaffold(endDrawer: new Drawer( ... )
).
How can I remove the hamburger button at the top (so that you can only get the drawer through sliding from the side (or through a custom button in the app - that I know how to do))?
In AppBar you need to do the following to hide default rendering hamburger icon
AppBar(
automaticallyImplyLeading: false, // this will hide Drawer hamburger icon
actions: <Widget>[Container()], // this will hide endDrawer hamburger icon
... // other props
),
and In SilverAppBar do the following to hide default rendering hamburger icon
SilverAppBar(
automaticallyImplyLeading: false, // this will hide Drawer hamburger icon
actions: <Widget>[Container()], // this will hide endDrawer hamburger icon
... // other props
}
I hope this will help...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With