Search code examples
fluttershadow

Remove or modify navigation drawer overlay shadow in Flutter


I created a Scaffold widget with appBar and drawer.

As I open the drawer, there is a shadow over the Scaffold's body widget. I'd like to either remove the shadow, make it not so "strong" or change the shade slightly.

I checked the docs and I didn't find any way to achieve this through public API.

Is there any way to remove the drawer menu's "drop shadow" on the body?

The elevation option is something different, even if I set it to 0, the overlay shadow on top of the body is still present.

This issue's description's screenshots might help clarify what I want.


Solution

  • If you want to get rid of the shadow over the Scaffold body then you have to change the Scaffold's drawerScrimColor's value to Colors.transparent.