Skip to content

Commit fd80ad6

Browse files
committed
feat(headlines-feed): pass image style to AdLoaderWidget
- Retrieve headline image style from AppBloc - Pass image style to AdLoaderWidget for consistent styling
1 parent 9c5d289 commit fd80ad6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/headlines-feed/view/headlines_feed_page.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,19 @@ class _HeadlinesFeedPageState extends State<HeadlinesFeedPage> {
319319
}
320320
return tile;
321321
} else if (item is AdPlaceholder) {
322+
// Retrieve the user's preferred headline image style from the AppBloc.
323+
// This is the single source of truth for this setting.
324+
final imageStyle = context
325+
.watch<AppBloc>()
326+
.state
327+
.settings
328+
.feedPreferences
329+
.headlineImageStyle;
322330
return AdLoaderWidget(
323331
adPlaceholder: item,
324332
adService: context.read<AdService>(),
325333
adThemeStyle: AdThemeStyle.fromTheme(Theme.of(context)),
334+
imageStyle: imageStyle,
326335
);
327336
} else if (item is CallToActionItem) {
328337
return CallToActionDecoratorWidget(

0 commit comments

Comments
 (0)