|
| 1 | +import 'package:auth_repository/auth_repository.dart'; |
1 | 2 | import 'package:flutter/material.dart'; |
2 | 3 | import 'package:flutter_bloc/flutter_bloc.dart'; |
| 4 | +import 'package:flutter_news_app_web_dashboard_full_source_code/app/bloc/app_bloc.dart'; |
| 5 | +import 'package:flutter_news_app_web_dashboard_full_source_code/app/config/config.dart' |
| 6 | + as local_config; |
| 7 | +import 'package:flutter_news_app_web_dashboard_full_source_code/app/view/app_shell.dart'; |
| 8 | +import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/view/app_configuration_page.dart'; |
| 9 | +import 'package:flutter_news_app_web_dashboard_full_source_code/authentication/bloc/authentication_bloc.dart'; |
| 10 | +import 'package:flutter_news_app_web_dashboard_full_source_code/authentication/view/authentication_page.dart'; |
| 11 | +import 'package:flutter_news_app_web_dashboard_full_source_code/authentication/view/email_code_verification_page.dart'; |
| 12 | +import 'package:flutter_news_app_web_dashboard_full_source_code/authentication/view/request_code_page.dart'; |
| 13 | +import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/content_management_page.dart'; |
| 14 | +import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/create_headline_page.dart'; |
| 15 | +import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/create_source_page.dart'; |
| 16 | +import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/create_topic_page.dart'; |
| 17 | +import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/edit_headline_page.dart'; |
| 18 | +import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/edit_source_page.dart'; |
| 19 | +import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/edit_topic_page.dart'; |
| 20 | +import 'package:flutter_news_app_web_dashboard_full_source_code/dashboard/view/dashboard_page.dart'; |
| 21 | +import 'package:flutter_news_app_web_dashboard_full_source_code/router/routes.dart'; |
| 22 | +import 'package:flutter_news_app_web_dashboard_full_source_code/settings/view/settings_page.dart'; |
3 | 23 | import 'package:go_router/go_router.dart'; |
4 | | -import 'package:ht_auth_repository/ht_auth_repository.dart'; |
5 | | -import 'package:ht_dashboard/app/bloc/app_bloc.dart'; |
6 | | -import 'package:ht_dashboard/app/config/config.dart' as local_config; |
7 | | -import 'package:ht_dashboard/app/view/app_shell.dart'; |
8 | | -import 'package:ht_dashboard/app_configuration/view/app_configuration_page.dart'; |
9 | | -import 'package:ht_dashboard/authentication/bloc/authentication_bloc.dart'; |
10 | | -import 'package:ht_dashboard/authentication/view/authentication_page.dart'; |
11 | | -import 'package:ht_dashboard/authentication/view/email_code_verification_page.dart'; |
12 | | -import 'package:ht_dashboard/authentication/view/request_code_page.dart'; |
13 | | -import 'package:ht_dashboard/content_management/view/content_management_page.dart'; |
14 | | -import 'package:ht_dashboard/content_management/view/create_headline_page.dart'; |
15 | | -import 'package:ht_dashboard/content_management/view/create_source_page.dart'; |
16 | | -import 'package:ht_dashboard/content_management/view/create_topic_page.dart'; |
17 | | -import 'package:ht_dashboard/content_management/view/edit_headline_page.dart'; |
18 | | -import 'package:ht_dashboard/content_management/view/edit_source_page.dart'; |
19 | | -import 'package:ht_dashboard/content_management/view/edit_topic_page.dart'; |
20 | | -import 'package:ht_dashboard/dashboard/view/dashboard_page.dart'; |
21 | | -import 'package:ht_dashboard/router/routes.dart'; |
22 | | -import 'package:ht_dashboard/settings/view/settings_page.dart'; |
23 | 24 |
|
24 | 25 | /// Creates and configures the GoRouter instance for the application. |
25 | 26 | /// |
26 | 27 | /// Requires an [authStatusNotifier] to trigger route re-evaluation when |
27 | 28 | /// authentication state changes. |
28 | 29 | GoRouter createRouter({ |
29 | 30 | required ValueNotifier<AppStatus> authStatusNotifier, |
30 | | - required HtAuthRepository htAuthenticationRepository, |
| 31 | + required AuthRepository authenticationRepository, |
31 | 32 | required local_config.AppEnvironment environment, |
32 | 33 | }) { |
33 | 34 | return GoRouter( |
@@ -99,7 +100,7 @@ GoRouter createRouter({ |
99 | 100 | builder: (BuildContext context, GoRouterState state) { |
100 | 101 | return BlocProvider( |
101 | 102 | create: (context) => AuthenticationBloc( |
102 | | - authenticationRepository: context.read<HtAuthRepository>(), |
| 103 | + authenticationRepository: context.read<AuthRepository>(), |
103 | 104 | ), |
104 | 105 | child: const AuthenticationPage(), |
105 | 106 | ); |
|
0 commit comments