3

I'm wondering how I can change the top-most color seen when my Drawer is open?

In the image below you can see two arrows, 1 and 2. Arrow 2 points at my main screen which is my primaryColor and is shown correctly on all screens except on my drawer.

I'm trying to have an all white drawer and want to remove the grey color from the top.

enter image description here

swedishcheef
  • 549
  • 2
  • 11
  • 25

3 Answers3

5

I think this may solve your issue, by removing padding of ListView.

drawer: new Drawer(
  child: new ListView(
    padding: const EdgeInsets.all(0.0),
    children: <Widget>[
       ......
    ]
  ),
),
Shri Hari L
  • 4,551
  • 2
  • 6
  • 18
1

Wrap your Drawer with SafeArea widget

David B.
  • 521
  • 1
  • 6
  • 18
0

I also had this my app, I changed ListView to Column and it worked. Usually, we don't keep too much in Drawer so Column worked for me.

drawer: new Drawer(
child: new Column(                  ///here change ListView to Column
padding: const EdgeInsets.all(0.0),
children: <Widget>[
   ......
]

), ),

Pulkit Prajapat
  • 190
  • 2
  • 11