diff --git a/lib/src/navigation.dart b/lib/src/navigation.dart index 8dbf6ea8b2..9aa47af188 100644 --- a/lib/src/navigation.dart +++ b/lib/src/navigation.dart @@ -78,12 +78,6 @@ final watchScrollController = ScrollController(debugLabel: 'WatchScroll'); final RouteObserver> rootNavPageRouteObserver = RouteObserver>(); -final RouteObserver> homeRouteObserver = - RouteObserver>(); - -final RouteObserver> watchRouteObserver = - RouteObserver>(); - final tabsProvider = Provider>((ref) { final l10n = ref.watch(l10nProvider); @@ -184,7 +178,6 @@ class BottomNavScaffold extends ConsumerWidget { case 0: return _MaterialTabView( navigatorKey: homeNavigatorKey, - navigatorObservers: [homeRouteObserver], builder: (context) => const HomeTabScreen(), ); case 1: @@ -201,7 +194,6 @@ class BottomNavScaffold extends ConsumerWidget { return _MaterialTabView( navigatorKey: watchNavigatorKey, builder: (context) => const WatchTabScreen(), - navigatorObservers: [watchRouteObserver], ); default: assert(false, 'Unexpected tab'); @@ -215,7 +207,6 @@ class BottomNavScaffold extends ConsumerWidget { return CupertinoTabView( defaultTitle: context.l10n.play, navigatorKey: homeNavigatorKey, - navigatorObservers: [homeRouteObserver], builder: (context) => const HomeTabScreen(), ); case 1: @@ -235,7 +226,6 @@ class BottomNavScaffold extends ConsumerWidget { defaultTitle: context.l10n.watch, navigatorKey: watchNavigatorKey, builder: (context) => const WatchTabScreen(), - navigatorObservers: [watchRouteObserver], ); default: assert(false, 'Unexpected tab');