Remove or modify navigation drawer overlay shadow in Flutter

3,394

Solution 1

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.

Solution 2

Have you tried setting the drawer's elevation to elevation: 0.0?

Solution 3

check this

drawerTheme:
          DrawerThemeData(scrimColor: Colors.transparent, elevation: 0.5),
Share:
3,394
Vince Varga
Author by

Vince Varga

Updated on December 10, 2022

Comments

  • Vince Varga
    Vince Varga over 1 year

    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.

  • Vince Varga
    Vince Varga about 5 years
    Yes, I mentioned it in the question: "The elevation option is something different, even if I set it to 0, the overlay shadow on top of the body is still present."
  • Vince Varga
    Vince Varga about 5 years
    Awesome, it's been added in this PR: github.com/flutter/flutter/pull/31025