Skip to content

Commit 28f5219

Browse files
committed
fix(bootstrap): instantiate and pass feedDecoratorService
Instantiates `FeedDecoratorService` in `bootstrap.dart` and passes it as a required argument to `AppInitializationPage`, resolving a compilation error.
1 parent 825eb15 commit 28f5219

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/bootstrap.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import 'package:flutter_news_app_mobile_client_full_source_code/app/services/dem
2828
import 'package:flutter_news_app_mobile_client_full_source_code/app/services/package_info_service.dart';
2929
import 'package:flutter_news_app_mobile_client_full_source_code/app/view/app_initialization_page.dart';
3030
import 'package:flutter_news_app_mobile_client_full_source_code/bloc_observer.dart';
31+
import 'package:flutter_news_app_mobile_client_full_source_code/feed_decorators/services/feed_decorator_service.dart';
3132
import 'package:flutter_news_app_mobile_client_full_source_code/headlines-feed/services/feed_cache_service.dart';
3233
import 'package:flutter_news_app_mobile_client_full_source_code/shared/data/clients/country_inmemory_client.dart';
3334
import 'package:http_client/http_client.dart';
@@ -203,6 +204,10 @@ Future<Widget> bootstrap(
203204
final feedCacheService = FeedCacheService(logger: logger);
204205
logger.fine('FeedCacheService initialized.');
205206

207+
// Initialize FeedDecoratorService.
208+
final feedDecoratorService = FeedDecoratorService(logger: logger);
209+
logger.fine('FeedDecoratorService initialized.');
210+
206211
// Create a GlobalKey for the NavigatorState to be used by AppBloc
207212
// and InterstitialAdManager for BuildContext access.
208213
final navigatorKey = GlobalKey<NavigatorState>();
@@ -510,6 +515,7 @@ Future<Widget> bootstrap(
510515
userContentPreferencesRepository: userContentPreferencesRepository,
511516
environment: environment,
512517
adService: adService,
518+
feedDecoratorService: feedDecoratorService,
513519
inlineAdCacheService: inlineAdCacheService,
514520
feedCacheService: feedCacheService,
515521
localAdRepository: localAdRepository,

0 commit comments

Comments
 (0)