Skip to content

Commit d85137d

Browse files
committed
refactor(ads): update ad_feed_item to use generic NativeAd model
- Replace Google Mobile Ads NativeAd with our generic app_native_ad.NativeAd model - Update class documentation to reflect the new generic ad model - Ensure compatibility with the application's feed structure
1 parent 5761c18 commit d85137d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/ads/models/ad_feed_item.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import 'package:core/core.dart';
22
import 'package:equatable/equatable.dart';
3-
import 'package:google_mobile_ads/google_mobile_ads.dart';
3+
import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/native_ad.dart'
4+
as app_native_ad;
45

56
/// {@template ad_feed_item}
67
/// A [FeedItem] that wraps a loaded native ad object from an ad network SDK.
78
///
8-
/// This class allows actual, displayable ad objects (like [NativeAd] from
9-
/// Google Mobile Ads) to be seamlessly integrated into the application's
9+
/// This class allows actual, displayable ad objects (like [app_native_ad.NativeAd]
10+
/// from our generic ad model) to be seamlessly integrated into the application's
1011
/// generic feed structure alongside other content types (e.g., [Headline]).
1112
/// {@endtemplate}
1213
class AdFeedItem extends FeedItem with EquatableMixin {
@@ -22,10 +23,10 @@ class AdFeedItem extends FeedItem with EquatableMixin {
2223
/// the ad within the feed.
2324
final String id;
2425

25-
/// The loaded native ad object from the ad network SDK.
26+
/// The loaded native ad object, represented by our generic [app_native_ad.NativeAd] model.
2627
///
2728
/// This object contains the actual ad content and is ready for display.
28-
final NativeAd nativeAd;
29+
final app_native_ad.NativeAd nativeAd;
2930

3031
@override
3132
List<Object?> get props => [id, nativeAd, type];

0 commit comments

Comments
 (0)