@@ -14,6 +14,7 @@ import 'package:flutter_news_app_mobile_client_full_source_code/account/view/man
1414import 'package:flutter_news_app_mobile_client_full_source_code/account/view/manage_followed_items/topics/followed_topics_list_page.dart' ;
1515import 'package:flutter_news_app_mobile_client_full_source_code/account/view/saved_headlines_page.dart' ;
1616import 'package:flutter_news_app_mobile_client_full_source_code/ads/ad_service.dart' ;
17+ import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/ad_theme_style.dart' ;
1718import 'package:flutter_news_app_mobile_client_full_source_code/app/bloc/app_bloc.dart' ;
1819import 'package:flutter_news_app_mobile_client_full_source_code/app/config/config.dart'
1920 as local_config;
@@ -22,7 +23,6 @@ import 'package:flutter_news_app_mobile_client_full_source_code/authentication/b
2223import 'package:flutter_news_app_mobile_client_full_source_code/authentication/view/authentication_page.dart' ;
2324import 'package:flutter_news_app_mobile_client_full_source_code/authentication/view/email_code_verification_page.dart' ;
2425import 'package:flutter_news_app_mobile_client_full_source_code/authentication/view/request_code_page.dart' ;
25- import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/ad_theme_style.dart' ;
2626import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/bloc/entity_details_bloc.dart' ;
2727import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/view/entity_details_page.dart' ;
2828import 'package:flutter_news_app_mobile_client_full_source_code/headline-details/bloc/headline_details_bloc.dart' ;
@@ -280,21 +280,24 @@ GoRouter createRouter({
280280 providers: [
281281 BlocProvider .value (value: accountBloc),
282282 BlocProvider (
283- create: (context) => EntityDetailsBloc (
284- headlinesRepository: context.read <DataRepository <Headline >>(),
285- topicRepository: context.read <DataRepository <Topic >>(),
286- sourceRepository: context.read <DataRepository <Source >>(),
287- countryRepository: context.read <DataRepository <Country >>(),
288- accountBloc: accountBloc,
289- appBloc: context.read <AppBloc >(),
290- feedDecoratorService: feedDecoratorService,
291- )..add (
292- EntityDetailsLoadRequested (
293- entityId: args.entityId,
294- contentType: args.contentType,
295- adThemeStyle: AdThemeStyle .fromTheme (Theme .of (context)),
283+ create: (context) =>
284+ EntityDetailsBloc (
285+ headlinesRepository: context
286+ .read <DataRepository <Headline >>(),
287+ topicRepository: context.read <DataRepository <Topic >>(),
288+ sourceRepository: context.read <DataRepository <Source >>(),
289+ countryRepository: context
290+ .read <DataRepository <Country >>(),
291+ accountBloc: accountBloc,
292+ appBloc: context.read <AppBloc >(),
293+ feedDecoratorService: feedDecoratorService,
294+ )..add (
295+ EntityDetailsLoadRequested (
296+ entityId: args.entityId,
297+ contentType: args.contentType,
298+ adThemeStyle: AdThemeStyle .fromTheme (Theme .of (context)),
299+ ),
296300 ),
297- ),
298301 ),
299302 ],
300303 child: EntityDetailsPage (args: args),
@@ -317,21 +320,24 @@ GoRouter createRouter({
317320 providers: [
318321 BlocProvider .value (value: accountBloc),
319322 BlocProvider (
320- create: (context) => EntityDetailsBloc (
321- headlinesRepository: context.read <DataRepository <Headline >>(),
322- topicRepository: context.read <DataRepository <Topic >>(),
323- sourceRepository: context.read <DataRepository <Source >>(),
324- countryRepository: context.read <DataRepository <Country >>(),
325- accountBloc: accountBloc,
326- appBloc: context.read <AppBloc >(),
327- feedDecoratorService: feedDecoratorService,
328- )..add (
329- EntityDetailsLoadRequested (
330- entityId: args.entityId,
331- contentType: args.contentType,
332- adThemeStyle: AdThemeStyle .fromTheme (Theme .of (context)),
323+ create: (context) =>
324+ EntityDetailsBloc (
325+ headlinesRepository: context
326+ .read <DataRepository <Headline >>(),
327+ topicRepository: context.read <DataRepository <Topic >>(),
328+ sourceRepository: context.read <DataRepository <Source >>(),
329+ countryRepository: context
330+ .read <DataRepository <Country >>(),
331+ accountBloc: accountBloc,
332+ appBloc: context.read <AppBloc >(),
333+ feedDecoratorService: feedDecoratorService,
334+ )..add (
335+ EntityDetailsLoadRequested (
336+ entityId: args.entityId,
337+ contentType: args.contentType,
338+ adThemeStyle: AdThemeStyle .fromTheme (Theme .of (context)),
339+ ),
333340 ),
334- ),
335341 ),
336342 ],
337343 child: EntityDetailsPage (args: args),
@@ -354,21 +360,24 @@ GoRouter createRouter({
354360 providers: [
355361 BlocProvider .value (value: accountBloc),
356362 BlocProvider (
357- create: (context) => EntityDetailsBloc (
358- headlinesRepository: context.read <DataRepository <Headline >>(),
359- topicRepository: context.read <DataRepository <Topic >>(),
360- sourceRepository: context.read <DataRepository <Source >>(),
361- countryRepository: context.read <DataRepository <Country >>(),
362- accountBloc: accountBloc,
363- appBloc: context.read <AppBloc >(),
364- feedDecoratorService: feedDecoratorService,
365- )..add (
366- EntityDetailsLoadRequested (
367- entityId: args.entityId,
368- contentType: args.contentType,
369- adThemeStyle: AdThemeStyle .fromTheme (Theme .of (context)),
363+ create: (context) =>
364+ EntityDetailsBloc (
365+ headlinesRepository: context
366+ .read <DataRepository <Headline >>(),
367+ topicRepository: context.read <DataRepository <Topic >>(),
368+ sourceRepository: context.read <DataRepository <Source >>(),
369+ countryRepository: context
370+ .read <DataRepository <Country >>(),
371+ accountBloc: accountBloc,
372+ appBloc: context.read <AppBloc >(),
373+ feedDecoratorService: feedDecoratorService,
374+ )..add (
375+ EntityDetailsLoadRequested (
376+ entityId: args.entityId,
377+ contentType: args.contentType,
378+ adThemeStyle: AdThemeStyle .fromTheme (Theme .of (context)),
379+ ),
370380 ),
371- ),
372381 ),
373382 ],
374383 child: EntityDetailsPage (args: args),
0 commit comments