Bottom overflow in Drawer
when I rotate the screen.
Asked
Active
Viewed 7,883 times
-1

CopsOnRoad
- 237,138
- 77
- 654
- 440

Sadakat Hussain Fahad
- 177
- 1
- 4
- 13
-
Please add some code which you have tried or any reference image – Kailash Chouhan Sep 10 '19 at 11:29
4 Answers
7
Use SingleChildScrollView
like this
drawer: Drawer(
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
children: <Widget>[
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
]),),)
Or
Drawer(
child: ListView(
children: <Widget>[
ListTile(
dense: true,
title: Text("Example"),
leading: new Image.asset(
"assets/images/example.png",
width: 20.0,
),
),
]),),

Lucas Matos
- 566
- 3
- 8
-
1What's the benefit of copying other 2 answers and putting it as yours? -1 from me. – Sep 11 '19 at 09:07
-
-
Just by adding one or two properties doesn't make your code look unique, everyone can do that, the main point of question was to either use `ListView` or `SingleChildScrollView`, may I know what special value you added to the post? – Sep 12 '19 at 09:28
2
Use ListView
for your Drawer
.
drawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
YourWidgetsHere(),
],
),
)

CopsOnRoad
- 237,138
- 77
- 654
- 440