@@ -2,9 +2,9 @@ import 'package:core/core.dart';
22import 'package:data_repository/data_repository.dart' ;
33import 'package:flutter_news_app_mobile_client_full_source_code/ads/ad_provider.dart' ;
44import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/ad_theme_style.dart' ;
5- import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/banner_ad.dart' ; // Import the new BannerAd model
5+ import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/banner_ad.dart' ;
66import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/interstitial_ad.dart' ;
7- import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/native_ad.dart' ; // Import the refactored NativeAd model
7+ import 'package:flutter_news_app_mobile_client_full_source_code/ads/models/native_ad.dart' ;
88import 'package:logging/logging.dart' ;
99import 'package:uuid/uuid.dart' ;
1010
@@ -41,6 +41,7 @@ class LocalAdProvider implements AdProvider {
4141 required AdPlatformIdentifiers adPlatformIdentifiers,
4242 required String ? adId,
4343 required AdThemeStyle adThemeStyle,
44+ HeadlineImageStyle ? headlineImageStyle, // Added for interface consistency
4445 }) async {
4546 if (adId == null || adId.isEmpty) {
4647 _logger.warning ('No local native ad ID provided.' );
@@ -58,7 +59,9 @@ class LocalAdProvider implements AdProvider {
5859 id: _uuid.v4 (),
5960 provider: AdPlatformType .local,
6061 adObject: localNativeAd,
61- templateType: NativeAdTemplateType .medium, // Default for local native
62+ templateType: headlineImageStyle == HeadlineImageStyle .largeThumbnail
63+ ? NativeAdTemplateType .medium
64+ : NativeAdTemplateType .small,
6265 );
6366 } else {
6467 _logger.warning (
@@ -85,6 +88,7 @@ class LocalAdProvider implements AdProvider {
8588 required AdPlatformIdentifiers adPlatformIdentifiers,
8689 required String ? adId,
8790 required AdThemeStyle adThemeStyle,
91+ HeadlineImageStyle ? headlineImageStyle, // Added for interface consistency
8892 }) async {
8993 if (adId == null || adId.isEmpty) {
9094 _logger.warning ('No local banner ad ID provided.' );
0 commit comments