Skip to content

Commit fd1cefe

Browse files
committed
fix(headlines-feed): add unique key to FeedAdLoaderWidget for AdPlaceholder
- Improve ad rendering performance by assigning a unique ValueKey to FeedAdLoaderWidget - Enhance ad placement stability and reduce potential issues in the headlines feed
1 parent 43ad1db commit fd1cefe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/headlines-feed/view/headlines_feed_page.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ class _HeadlinesFeedPageState extends State<HeadlinesFeedPage> {
342342
}
343343

344344
return FeedAdLoaderWidget(
345+
key: ValueKey(item.id), // Add a unique key for AdPlaceholder
345346
adPlaceholder: item,
346347
adThemeStyle: AdThemeStyle.fromTheme(Theme.of(context)),
347348
adConfig: adConfig,

0 commit comments

Comments
 (0)