Skip to content

Commit

Permalink
Remove unused nav observers
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Feb 7, 2024
1 parent 881d843 commit 7bf906d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/src/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ final watchScrollController = ScrollController(debugLabel: 'WatchScroll');
final RouteObserver<PageRoute<void>> rootNavPageRouteObserver =
RouteObserver<PageRoute<void>>();

final RouteObserver<PageRoute<void>> homeRouteObserver =
RouteObserver<PageRoute<void>>();

final RouteObserver<PageRoute<void>> watchRouteObserver =
RouteObserver<PageRoute<void>>();

final tabsProvider = Provider<List<_Tab>>((ref) {
final l10n = ref.watch(l10nProvider);

Expand Down Expand Up @@ -184,7 +178,6 @@ class BottomNavScaffold extends ConsumerWidget {
case 0:
return _MaterialTabView(
navigatorKey: homeNavigatorKey,
navigatorObservers: [homeRouteObserver],
builder: (context) => const HomeTabScreen(),
);
case 1:
Expand All @@ -201,7 +194,6 @@ class BottomNavScaffold extends ConsumerWidget {
return _MaterialTabView(
navigatorKey: watchNavigatorKey,
builder: (context) => const WatchTabScreen(),
navigatorObservers: [watchRouteObserver],
);
default:
assert(false, 'Unexpected tab');
Expand All @@ -215,7 +207,6 @@ class BottomNavScaffold extends ConsumerWidget {
return CupertinoTabView(
defaultTitle: context.l10n.play,
navigatorKey: homeNavigatorKey,
navigatorObservers: [homeRouteObserver],
builder: (context) => const HomeTabScreen(),
);
case 1:
Expand All @@ -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');
Expand Down

0 comments on commit 7bf906d

Please sign in to comment.