Skip to content

Commit 3c159f0

Browse files
committed
fix(ads): include template type when creating a native AdMob ad
- Add mapping for small and medium template types when creating a native AdMob ad - Ensure proper conversion between AdMob template types and internal template types
1 parent f0e40d2 commit 3c159f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ads/admob_ad_provider.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ class AdMobAdProvider implements AdProvider {
156156
id: _uuid.v4(), // Generate a unique ID for our internal model
157157
provider: app_native_ad.AdProviderType.admob, // Set the provider
158158
adObject: googleNativeAd, // Store the original AdMob object
159+
templateType: switch (templateType) {
160+
admob.TemplateType.small => app_native_ad.NativeAdTemplateType.small,
161+
admob.TemplateType.medium => app_native_ad.NativeAdTemplateType.medium,
162+
},
159163
);
160164
}
161165

0 commit comments

Comments
 (0)