Reputation: 1415
I want to use Drawer.
When the Drawer unfolds - as you can see in the video in the link - the background or the rest of window is shadowed to let the user focus on the drawer.
I feel that the shadow is very dark, is there any way to change the color of the shadow? The documentation for the Drawer class lists several parameters such as shadowColor but it seems to be outdated since the Drawer class only takes the parameter
this.backgroundColor,
this.elevation,
this.shape,
this.width,
this.child,
this.semanticLabel,
Any idea or trick?
Upvotes: 1
Views: 512
Reputation: 20098
Changing the overlay color of the Drawer
doesn't have to do with the Drawer
, but rather the Scaffold
itself. You need to set drawerScrimColor
to transparent
:
The color to use for the scrim that obscures primary content while a drawer is open.
Scaffold(
drawerScrimColor: Colors.transparent,
Upvotes: 3