From 001549b190b2af1ede8f7eaae508a9a33518eb99 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 15 Oct 2025 22:55:37 +0800 Subject: [PATCH] :lipstick: Fix notification bottom sheet covered with sheet --- lib/route.dart | 6 ------ lib/screens/account.dart | 3 ++- lib/screens/explore.dart | 3 ++- lib/screens/notification.dart | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/route.dart b/lib/route.dart index 19ccc77b..a5ebdd5a 100644 --- a/lib/route.dart +++ b/lib/route.dart @@ -25,7 +25,6 @@ import 'package:island/screens/tabs.dart'; import 'package:island/screens/explore.dart'; import 'package:island/screens/discovery/article_detail.dart'; import 'package:island/screens/account.dart'; -import 'package:island/screens/notification.dart'; import 'package:island/screens/wallet.dart'; import 'package:island/screens/account/relationship.dart'; import 'package:island/screens/account/profile.dart'; @@ -392,11 +391,6 @@ final routerProvider = Provider((ref) { ), ], ), - GoRoute( - name: 'notifications', - path: '/account/notifications', - builder: (context, state) => const NotificationScreen(), - ), GoRoute( name: 'wallet', path: '/account/wallet', diff --git a/lib/screens/account.dart b/lib/screens/account.dart index ba83ce9e..0f6f2301 100644 --- a/lib/screens/account.dart +++ b/lib/screens/account.dart @@ -285,7 +285,8 @@ class AccountScreen extends HookConsumerWidget { showModalBottomSheet( context: context, isScrollControlled: true, - builder: (context) => const NotificationScreen(), + useRootNavigator: true, + builder: (context) => const NotificationSheet(), ); }, ), diff --git a/lib/screens/explore.dart b/lib/screens/explore.dart index 83358023..513c0a75 100644 --- a/lib/screens/explore.dart +++ b/lib/screens/explore.dart @@ -57,7 +57,8 @@ Widget notificationIndicatorWidget( showModalBottomSheet( context: context, isScrollControlled: true, - builder: (context) => const NotificationScreen(), + useRootNavigator: true, + builder: (context) => const NotificationSheet(), ); }, ), diff --git a/lib/screens/notification.dart b/lib/screens/notification.dart index a3f8a2a6..4f6d4688 100644 --- a/lib/screens/notification.dart +++ b/lib/screens/notification.dart @@ -112,8 +112,8 @@ class NotificationListNotifier extends _$NotificationListNotifier } } -class NotificationScreen extends HookConsumerWidget { - const NotificationScreen({super.key}); +class NotificationSheet extends HookConsumerWidget { + const NotificationSheet({super.key}); @override Widget build(BuildContext context, WidgetRef ref) {