'How to slide from left to call Appbar flutter
i have a project that require you call Appbar if slide left, so in my phone if i slide from left it should call the appbar.
my idea is to wrap the scalfolding with a container, but i dont a way which if i can detect a swipe without moving to call the app bar
Solution 1:[1]
To open the drawer do this
Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false
),
drawer: Drawer(),
body: ...
);
But if you want to change the drawer button icon do this instead
Scaffold(
appBar: AppBar(
leading: Builder(
builder: (context) => IconButton(
padding: EdgeInsets.zero,
icon: //your icon,
onPressed: () => Scaffold.of(context).openDrawer()
),
),
),
drawer: Drawer(),
body: ...
);
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 |
