'Flutter - Drawer slide area expand
I have drawer on flutter project. how do i expand the drawer slide area?
Solution 1:[1]
You can drawerEdgeDragWidth
return Scaffold(
...
drawerEdgeDragWidth: MediaQuery.of(context).size.width,
...
);
Solution 2:[2]
It's better if you help us with your code. But if i gotten your question, you can expand your drawer to the width you need.
@override
Widget build(BuildContext context) {
return SafeArea(
bottom: false,
child: ClipRRect(
borderRadius:
BorderRadius.only(
topRight: Radius.circular(35.0),
bottomRight: Radius.circular(35.0),),
child: Container( //wrap the drawer with a container
width: MediaQuery.of(context).size.width * 0.30, // -> 30% of the screen
child: Drawer(
child: ListView(
padding: EdgeInsets.zero,
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
children: <Widget>[
//Your drawer items
],
),
),
),
),
);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Amir Mohammad Shams |
| Solution 2 | Frank Yager |

