Skip to content

Commit 93a8449

Browse files
committed
feat(shared): add ContentLimitationService
- Add ContentLimitationService to the app's dependency injection system - Ensure ContentLimitationService is created with the required AppBloc dependency - Update imports to include the new service
1 parent 1a7d1e0 commit 93a8449

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/app/view/app.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import 'package:flutter_news_app_mobile_client_full_source_code/authentication/b
1616
import 'package:flutter_news_app_mobile_client_full_source_code/l10n/app_localizations.dart';
1717
import 'package:flutter_news_app_mobile_client_full_source_code/router/router.dart';
1818
import 'package:flutter_news_app_mobile_client_full_source_code/status/view/view.dart';
19+
import 'package:flutter_news_app_mobile_client_full_source_code/shared/services/content_limitation_service.dart';
1920
import 'package:go_router/go_router.dart';
2021
import 'package:kv_storage_service/kv_storage_service.dart';
2122
import 'package:logging/logging.dart';
@@ -158,6 +159,12 @@ class App extends StatelessWidget {
158159
// Ensure it's created immediately
159160
lazy: false,
160161
),
162+
// Provide the ContentLimitationService.
163+
// It depends on AppBloc, so it is created here.
164+
RepositoryProvider(
165+
create: (context) =>
166+
ContentLimitationService(appBloc: context.read<AppBloc>()),
167+
),
161168
],
162169
child: _AppView(
163170
authenticationRepository: _authenticationRepository,

0 commit comments

Comments
 (0)