From bb23a12be34b03e3aed71a2354d49b1d4c2b3d64 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 1 Dec 2024 11:05:54 +0800 Subject: [PATCH] :lipstick: Drawer won't slide to open if page can go back :lipstick: Fix album loading indicator --- lib/screens/album.dart | 3 ++- lib/widgets/navigation/app_scaffold.dart | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/screens/album.dart b/lib/screens/album.dart index f27adb0..351c6e8 100644 --- a/lib/screens/album.dart +++ b/lib/screens/album.dart @@ -116,7 +116,8 @@ class _AlbumScreenState extends State { ), if (_isBusy) SliverToBoxAdapter( - child: const CircularProgressIndicator().padding(all: 24), + child: + const CircularProgressIndicator().padding(all: 24).center(), ), ], ), diff --git a/lib/widgets/navigation/app_scaffold.dart b/lib/widgets/navigation/app_scaffold.dart index dec9e84..954b8c7 100644 --- a/lib/widgets/navigation/app_scaffold.dart +++ b/lib/widgets/navigation/app_scaffold.dart @@ -65,6 +65,9 @@ class AppRootScaffold extends StatelessWidget { NavigationProvider.kShowBottomNavScreen.contains(routeName) ? ResponsiveBreakpoints.of(context).smallerOrEqualTo(MOBILE) : false; + final isPopable = !NavigationProvider.kAllDestination + .map((ele) => ele.screen) + .contains(routeName); final innerWidget = isCollapseDrawer ? body @@ -97,6 +100,7 @@ class AppRootScaffold extends StatelessWidget { ], ), drawer: !isExpandDrawer ? AppNavigationDrawer() : null, + drawerEdgeDragWidth: isPopable ? 0 : null, bottomNavigationBar: isShowBottomNavigation ? AppBottomNavigationBar() : null, ),