Skip to content

Commit

Permalink
feat: add functionality for drawer swipe from left
Browse files Browse the repository at this point in the history
resolves #427
  • Loading branch information
tusharlock10 committed Feb 21, 2024
1 parent bc297bc commit 80d94c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/screens/app_drawer/app_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ class AppDrawer extends HookConsumerWidget {
[showPlayerDependentButtons],
);

return Drawer(
child: SafeArea(
return SafeArea(
child: Drawer(
child: Column(
children: [
const SizedBox(height: 20),
Expand Down
2 changes: 2 additions & 0 deletions lib/screens/connect_profile/connect_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ class ConnectProfile extends HookConsumerWidget {
// Build Widgets
return Scaffold(
drawer: const AppDrawer(),
drawerEnableOpenDragGesture: constants.isMobile,
drawerEdgeDragWidth: MediaQuery.of(context).size.width / 3,
appBar: AppBar(
title: const Text("Connect Profile"),
),
Expand Down
3 changes: 2 additions & 1 deletion lib/screens/main/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ class Main extends HookWidget {

return Scaffold(
drawer: const AppDrawer(),
drawerEnableOpenDragGesture: false,
drawerEnableOpenDragGesture: constants.isMobile,
drawerEdgeDragWidth: MediaQuery.of(context).size.width / 3,
onDrawerChanged: onDrawerChanged,
body: MainPagesStack(selectedIndex: selectedIndex.value),
bottomNavigationBar: MainBottomTabs(
Expand Down

0 comments on commit 80d94c1

Please sign in to comment.