Skip to content

Commit 6bfec18

Browse files
committed
fix(router): integrate go_router_observer into router configuration
1 parent 880c64d commit 6bfec18

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/router/router.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:auth_repository/auth_repository.dart';
22
import 'package:core/core.dart' hide AppStatus;
33
import 'package:data_repository/data_repository.dart';
44
import 'package:flutter/material.dart';
5+
import 'package:flutter_news_app_mobile_client_full_source_code/router/go_router_observer.dart';
56
import 'package:flutter_bloc/flutter_bloc.dart';
67
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/account_page.dart';
78
import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/countries/add_country_to_follow_page.dart';
@@ -93,9 +94,7 @@ GoRouter createRouter({
9394
initialLocation: '/',
9495
debugLogDiagnostics: true,
9596
navigatorKey: navigatorKey,
96-
observers: [
97-
// Add any other necessary observers here. If none, this can be an empty list.
98-
],
97+
observers: [GoRouterObserver(logger: logger)],
9998
// --- Redirect Logic ---
10099
// This function is the single source of truth for route protection.
101100
// It's driven by the AppBloc's AppLifeCycleStatus.

0 commit comments

Comments
 (0)