2

I'm trying to create a Drawer inside of a Container, without using an appbar. Actually I need to do this screen, but only need help with that rounded shape that is in the background.

Thanks!

this is the screen

2 Answers 2

3

Firstly, create a Globalkey for Scaffold. Like this..

final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();

And give that key to Scaffold

Scaffold (
  key: _scaffoldKey,
  child: Container(),
)

And when you want to open the Drawer..

onTap(): _scaffoldKey.currentState.openDrawer()
0
onTap: () {Scaffold.of(context).openDrawer(); },
1
  • 3
    Add some explanation of your code would be preferred.
    – keikai
    May 12, 2020 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.