Skip to content

Commit d8313cb

Browse files
committed
refactor(ads): update native ad model import and usage
- Update import statement to use the app-specific NativeAd model - Replace NativeAd with app_native_ad.NativeAd in method return type - Enhance code clarity and maintainability by using app-specific models
1 parent 0c7703a commit d8313cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/ads/ad_provider.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import 'package:google_mobile_ads/google_mobile_ads.dart';
1+
import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/native_ad.dart'
2+
as app_native_ad;
23

34
/// {@template ad_provider}
45
/// An abstract class defining the interface for any ad network provider.
@@ -19,9 +20,9 @@ abstract class AdProvider {
1920

2021
/// Loads a native ad.
2122
///
22-
/// Returns a [NativeAd] object if an ad is successfully loaded,
23+
/// Returns a [app_native_ad.NativeAd] object if an ad is successfully loaded,
2324
/// otherwise returns `null`.
24-
Future<NativeAd?> loadNativeAd();
25+
Future<app_native_ad.NativeAd?> loadNativeAd();
2526

2627
// Future methods for other ad types (e.g., interstitial, banner)
2728
// can be added here as needed in the future.

0 commit comments

Comments
 (0)