Home > Enterprise >  Make Scaffold create a Drawer but not create the drawer related icon button in the app-bar
Make Scaffold create a Drawer but not create the drawer related icon button in the app-bar

Time:07-18

My app uses a Drawer to present an item properties inspector by means of endDrawer:.

The Drawer appears, then an item gets clicked. It disappears, when the properties inspector performs its save operation.

Thus, there is no need to make the Drawer come in using a click on draw icon button in the app-bar.

If endDrawer is set, navigation arrow does not appear, but space gets consumed:

enter image description here

If endDrawer isn't set, back arrow gets its space:

enter image description here

How to tell Scaffold prepare a Drawer passed via drawer: or endDrawer:, but not insert the related icon button in the app-bar?

CodePudding user response:

Put SizedBox.shrink() inleading widget in Appbar

CodePudding user response:

You can use automaticallyImplyLeading: false on AppBar

drawer: Drawer(),
appBar: AppBar(
    automaticallyImplyLeading: false,
    ),
  • Related