admob_flutter_plus library

A community-maintained Flutter plugin for the Google Mobile Ads Next-Gen SDK on Android.

This is an unofficial package: it is not published, endorsed, or maintained by Google. It wraps the official com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk with an idiomatic, Future-first Dart API.

Classes

AdapterStatus
Status of a single mediation adapter after MobileAds.initialize.
AdBanner
Banner placement used by AdManager.banner and AdManager.showPreLoadedBanner.
AdError
Describes a failure reported by the underlying Google Mobile Ads SDK.
AdManager
Convenience facade over the low-level AdMob SDK APIs.
AdNative
Native ad placement used by AdManager.native.
AdRequest
Per-request targeting information passed to every ad load.
AdSize
Describes the size of a banner ad.
AppOpenAd
A full-screen app open ad.
AppStateEventNotifier
Emits process-level foreground/background transitions.
BannerAdController
Controls a BannerAdView, enabling a manual refresh without recreating the PlatformView.
BannerAdListener
Callbacks for the lifecycle of a BannerAdView.
BannerAdPreloader
Preloads banner ads so they can be shown instantly.
BannerAdView
A widget that displays a banner ad using an Android AdView PlatformView.
ConsentForm
Bridge over the UMP ConsentForm.
ConsentInformation
Bridge over the UMP (User Messaging Platform) ConsentInformation.
ConsentRequestParameters
Parameters controlling a consent information update request.
FullScreenAdListener
Callbacks shared by every full-screen ad format (interstitial, rewarded, rewarded interstitial, and app open).
InitializationStatus
Aggregate result of MobileAds.initialize, including mediation adapters.
InterstitialAd
A full-screen interstitial ad.
InterstitialAdPreloader
Preloads interstitial ads so they can be shown instantly.
MobileAds
Entry point for initializing and configuring the Google Mobile Ads SDK.
NativeAd
A native ad loaded via the SDK's NativeAdLoader.
NativeAdListener
Callbacks for the lifecycle of a NativeAd.
NativeAdOptions
Options controlling how a native ad and its media are loaded.
NativeAdViewStyle
Visual styling applied to a native ad template.
NativeBannerAdView
Compact native template: icon + headline + call-to-action (~92 dp).
NativeCustomAdView
Renders a loaded NativeAd using a custom Android XML layout from Flutter assets.
NativeLargeAdView
Large native template: media + headline + body + call-to-action (~380 dp).
NativeSmallAdView
Small native template: icon + headline + body + call-to-action (~150 dp).
NativeTemplate
Native template layout for AdManager.native / AdNative.
PictureInPictureAd
A picture-in-picture (PiP) ad — open beta in GMA Next-Gen 1.4.0+.
PictureInPictureAdListener
Lifecycle callbacks for a PictureInPictureAd.
PictureInPictureAdOptions
Options passed to PictureInPictureAd.show.
PreAdUnitIds
Ad unit IDs used only by AdManager preloaders / resume app-open.
RequestConfiguration
Global configuration applied to every ad request.
RewardedAd
A full-screen rewarded ad.
RewardedAdPreloader
Preloads rewarded ads so they can be shown instantly.
RewardedInterstitialAd
A full-screen rewarded interstitial ad.
RewardedInterstitialAdPreloader
Preloads rewarded interstitial ads so they can be shown instantly.
RewardItem
A reward granted to the user for engaging with a rewarded ad.

Enums

AdapterInitializationState
Initialization lifecycle of a mediation adapter (GMA Next-Gen).
AdSizeType
Categories of banner ad size supported by the Next-Gen SDK.
AgeRestrictedTreatment
Age-restricted treatment applied to ad requests (GMA Next-Gen).
AppState
Process-level application state.
ConsentDebugGeography
Debug geography used to force a consent form to appear during testing.
ConsentStatus
Consent status reported by the UMP SDK.
MaxAdContentRating
Maximum content rating an ad is allowed to have.
PictureInPictureAdPosition
Screen corner (or SDK default) for a picture-in-picture ad.
PictureInPictureAdPresentationScope
Whether a PiP ad is bound to the current Activity or the whole app.
TagForChildDirectedTreatment
A three-state tag used for COPPA / GDPR style declarations.
TagForUnderAgeOfConsent
See TagForChildDirectedTreatment; applied to users under the age of consent.

Functions

parseAdapterInitializationState(String? raw) AdapterInitializationState
Parses a native InitializationState.name (for example COMPLETE).

Typedefs

AppOpenAdListener = FullScreenAdListener
Listener for app open full-screen content events.
InterstitialAdListener = FullScreenAdListener
Listener for interstitial full-screen content events.
OnUserEarnedReward = void Function(RewardItem reward)
Callback invoked when the user earns a reward.
RewardedAdListener = FullScreenAdListener
Listener for rewarded full-screen content events.
RewardedInterstitialAdListener = FullScreenAdListener
Listener for rewarded interstitial full-screen content events.

Exceptions / Errors

AdInspectorException
Thrown when opening the Ad Inspector fails.
AdLoadException
Thrown when an ad fails to load.
NativeTemplateException
Thrown when a custom native ad template cannot be loaded or is invalid.