admob_flutter_plus 0.1.3
admob_flutter_plus: ^0.1.3 copied to clipboard
Community Flutter plugin for Google Mobile Ads Next-Gen SDK (Android): banners, interstitials, rewarded, native templates, preloaders, UMP, app open.
Changelog #
All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.3 #
Added #
- AdMob Mediation support for GMA Next-Gen: Gradle excludes for legacy
play-services-ads/play-services-ads-lite, andMobileAds.initialize()now returnsInitializationStatuswith per-adapterAdapterStatus(AdapterInitializationState:complete,failed,initializing,notStarted,timedOut, plusisComplete) and description/latency. Documented Next-Gen adapter setup (Mavencom.google.ads.mediation:*in the host app — notgma_mediation_*/google_mobile_ads). RequestConfiguration.ageRestrictedTreatment(child/teen/unspecified) matching GMA Next-GensetAgeRestrictedTreatment.ConsentDebugGeography.otherandregulatedUsState(UMP debug geography).- GMA Next-Gen 1.3.0 API surface:
MobileAds.initialize(disableSdkCrashReporting: …)Ad.getAdUnitId()exposed asadUnitIdon full-screen ads,NativeAd.resolvedAdUnitId, andBannerAdController.adUnitId- README docs for the
DISABLE_AD_INSPECTORmanifest flag
Changed #
- Android library deps bumped: GMA Next-Gen
ads-mobile-sdk:1.3.0,lifecycle-process:2.11.0,kotlinx-coroutines-android:1.11.0(UMP remains4.0.0). Plugin AGP stays on Flutter-ecosystem8.13.1(not host AGP — apps keep their own Gradle/AGP). - Kotlin callbacks renamed to match AdMob SDK parameter names (silences named-argument warnings).
Deprecated #
TagForChildDirectedTreatment/TagForUnderAgeOfConsent— useAgeRestrictedTreatment.ConsentDebugGeography.notEea— useConsentDebugGeography.other.
Fixed #
- Native template inflater: avoid deprecated
scaledDensityand redundantMarginLayoutParamstype check.
0.1.2 #
Added #
- Custom native asset templates: support Android
Space(andandroid.widget.Space) in XML inflated byNativeCustomAdView.
0.1.1 #
Fixed #
- README screenshots on pub.dev: use absolute GitHub raw image URLs and a fixed width for banner/native device screenshots so images render correctly and take less vertical space.
0.1.0 #
Initial release. Android-only, built on the Google Mobile Ads Next-Gen SDK
(ads-mobile-sdk:1.2.1).
Added #
- Core:
MobileAds.initialize,getVersion,openAdInspector,setRequestConfiguration,AdRequest,AdErrortypes, and anadId-based callback channel. - Consent: UMP
ConsentInformationandConsentFormbridge. - App state:
AppStateEventNotifierbacked byProcessLifecycleOwner. - Banner ads:
BannerAdView,BannerAdController(refresh()), fullAdSizesurface.AdSize.anchored()maps togetLargeAnchoredAdaptiveBannerAdSize. - Collapsible banner support via
AdRequest.extras. - Interstitial, rewarded, rewarded interstitial, and app open ads with a Future-first load API and auto-consuming full-screen lifecycle.
- Preloaders for interstitial, rewarded, and rewarded interstitial ads
(
InterstitialAdPreloader,RewardedAdPreloader,RewardedInterstitialAdPreloader) — the formats documented by Google's Next-Gen preloading guides. - Native ads with three prebuilt templates (banner, small, large), styling, and Native Validator media deferral for the large template.
- Native ads can use custom XML templates from Flutter assets via
NativeCustomAdView(android:tagbinding). ThrowsNativeTemplateExceptionwhen the asset is missing or required tags are absent. Optional asset tags include advertiser, price, store, stars, and media. - Native ad
NativeAdViewStyle.fontFamily(optional). When omitted, template widgets inherit the host app font fromThemeData/DefaultTextStyle. - Full example app exercising every ad type with Google test ad units.
- Unit tests for
AdSize, banner retry policy, request/config serialization.
Fixed #
- Banner PlatformView dispose races (safe post-dispose callbacks) that could crash the host app when leaving a screen that still had banners loading.
- Example app: replaced
TabBarViewwith single-section navigation so AdMob PlatformViews are fully disposed before another section mounts. - Custom asset templates no longer call Android
LayoutInflateron a rawXmlPullParser(which crashed withXmlPullAttributes cannot be cast to XmlBlock$Parser). Templates are inflated programmatically from the asset XML instead.
