admob_nextgen library

Flutter wrapper around the Google Mobile Ads (GMA) Next-Gen SDK 1.0+.

Android only. For iOS, combine this package with google_mobile_ads.

Provides idiomatic Dart access to:

Classes

AdError
Information about why an ad failed to load or show.
AdRequest
Targeting parameters attached to a single ad request.
AdSize
Logical banner size sent across the platform channel.
AppOpenAd
Full-screen ad shown when the user opens (or returns to) the app.
AppOpenAdListener
Lifecycle callbacks fired by an AppOpenAd.
AppStateEventNotifier
Notifies changes in the Android app process foreground/background state.
BannerAdListener
Lifecycle callbacks fired by a BannerAdView.
BannerAdView
Widget that hosts a GMA Next-Gen banner ad inside the Flutter view tree.
ConsentDebugSettings
Debug-only UMP settings.
ConsentForm
Methods for loading and showing UMP consent forms.
ConsentFormError
Error returned by the User Messaging Platform consent APIs.
ConsentInformation
Utility methods for reading and updating UMP consent information.
ConsentRequestParameters
Parameters used when requesting updated consent information.
InitializationStatus
Result of MobileAds.initialize.
InterstitialAd
A full-screen interstitial ad.
InterstitialAdListener
Lifecycle callbacks fired by an InterstitialAd.
InterstitialAdPreloader
Pool-based preloader for InterstitialAds — the GMA Next-Gen SDK loads ads ahead of time so poll returns instantly.
MobileAds
Entry point for the GMA Next-Gen SDK.
NativeAd
A standard native ad loaded by the GMA Next-Gen SDK.
NativeAdListener
Lifecycle callbacks fired by a NativeAd.
NativeAdOptions
Optional configuration for standard native ad requests.
NativeAdView
Widget that renders a loaded NativeAd. Defaults to the large template.
NativeAdViewStyle
Optional styling for Android native ad templates.
NativeBannerAdView
Smallest native template: icon, headline, and call-to-action.
NativeLargeAdView
Largest native template with media content.
NativeSmallAdView
Native template with icon, headline, description, and call-to-action.
RequestConfiguration
Global configuration applied to every ad request from the SDK.
RewardedAd
A rewarded ad that grants RewardItem after the reward threshold.
RewardedAdListener
Lifecycle callbacks fired by a RewardedAd.
RewardedInterstitialAd
A rewarded interstitial ad with an interstitial-style full-screen flow.
RewardedInterstitialAdListener
Lifecycle callbacks fired by a RewardedInterstitialAd.
RewardedInterstitialAdPreloader
Pool-based preloader for RewardedInterstitialAds. Same shape as InterstitialAdPreloader — see its docs for usage.
RewardItem
Reward granted to a user after watching a rewarded ad.

Enums

AppState
The app foreground/background state.
ConsentStatus
User consent status values reported by UMP.
DebugGeography
Debug geography values for testing consent forms.
MaxAdContentRating
Maximum content rating allowed by the publisher.
NativeAdTemplate
Available Android native ad template layouts.
PrivacyOptionsRequirementStatus
Indicates whether a privacy options entry point must be shown.
PublisherPrivacyPersonalizationState
Publisher-level personalization toggle (typically used when implementing "Do not sell my data" controls).
TagForChildDirectedTreatment
COPPA / child-directed treatment.
TagForUnderAgeOfConsent
EEA under-age-of-consent treatment.

Exceptions / Errors

AdLoadException
Thrown by XxxAd.load(...) when the SDK reports a load failure.
ConsentFormException
Exception thrown by consent APIs that cannot complete successfully.