Skip to content

Commit

Permalink
fix: remove drawer on editor page
Browse files Browse the repository at this point in the history
  • Loading branch information
maelchiotti committed Mar 25, 2024
1 parent 86fde8c commit 644d540
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/common/routing/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ PreferredSizeWidget? _getAppBar(BuildContext context) {
}
}

Widget? _getDrawer() {
if (RouterRoute.currentRoute.drawerIndex == null) return null;

return const SideNavigation();
}

Widget? _getFloatingActionButton(BuildContext context) {
switch (RouterRoute.currentRoute) {
case RouterRoute.notes:
Expand All @@ -47,7 +53,7 @@ final router = GoRouter(
return Scaffold(
key: drawerKey,
appBar: _getAppBar(context),
drawer: const SideNavigation(),
drawer: _getDrawer(),
body: child,
floatingActionButton: _getFloatingActionButton(context),
);
Expand Down

0 comments on commit 644d540

Please sign in to comment.