Skip to content

Commit 8594d4f

Browse files
committed
feat(entity_details): pass image style to AdLoaderWidget
- Retrieve the user's preferred headline image style from AppBloc - Pass the image style to AdLoaderWidget in entity details page
1 parent fd80ad6 commit 8594d4f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/entity_details/view/entity_details_page.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,22 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
382382
}
383383
return tile;
384384
} else if (item is AdPlaceholder) {
385+
// Retrieve the user's preferred headline image style from the AppBloc.
386+
// This is the single source of truth for this setting.
387+
final imageStyle = context
388+
.watch<AppBloc>()
389+
.state
390+
.settings
391+
.feedPreferences
392+
.headlineImageStyle;
393+
385394
return AdLoaderWidget(
386395
adPlaceholder: item,
387396
adService: context.read<AdService>(),
388397
adThemeStyle: AdThemeStyle.fromTheme(
389398
Theme.of(context),
390399
),
400+
imageStyle: imageStyle,
391401
);
392402
}
393403
return const SizedBox.shrink();

0 commit comments

Comments
 (0)