Skip to content

Commit 75064d4

Browse files
committed
fix: fixed the ProviderNotFoundException by adding ContentManagementBloc to the MultiBlocProvider in lib/app/view/app.dart. The application should now correctly provide the ContentManagementBloc to the ContentManagementPage and its sub-pages
1 parent 6720b08 commit 75064d4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/app/view/app.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import 'package:ht_dashboard/app/bloc/app_bloc.dart';
1010
import 'package:ht_dashboard/app/config/app_environment.dart';
1111
import 'package:ht_dashboard/app_configuration/bloc/app_configuration_bloc.dart';
1212
import 'package:ht_dashboard/authentication/bloc/authentication_bloc.dart';
13+
import 'package:ht_dashboard/content_management/bloc/content_management_bloc.dart';
1314
import 'package:ht_dashboard/l10n/app_localizations.dart';
1415
import 'package:ht_dashboard/router/router.dart';
1516
// Import for app_theme.dart
@@ -90,6 +91,13 @@ class App extends StatelessWidget {
9091
appConfigRepository: context.read<HtDataRepository<AppConfig>>(),
9192
),
9293
),
94+
BlocProvider(
95+
create: (context) => ContentManagementBloc(
96+
headlinesRepository: context.read<HtDataRepository<Headline>>(),
97+
categoriesRepository: context.read<HtDataRepository<Category>>(),
98+
sourcesRepository: context.read<HtDataRepository<Source>>(),
99+
),
100+
),
93101
],
94102
child: _AppView(
95103
htAuthenticationRepository: _htAuthenticationRepository,

0 commit comments

Comments
 (0)