google_mobile_ads library

Classes

The base class for all ads.
AdapterResponseInfo
Response information for an individual ad network in an ad response.
AdapterStatus
An immutable snapshot of a mediation adapter's initialization status.
AdError
Error information about why an ad operation failed.
AdManagerAdRequest
Targeting info per the Ad Manager API.
AdManagerBannerAd
A banner ad displayed with Google Ad Manager.
AdManagerBannerAdListener
A listener for receiving notifications for the lifecycle of an AdManagerBannerAd.
AdManagerInterstitialAd
A full-screen interstitial ad for use with Ad Manager.
AdManagerInterstitialAdLoadCallback
This class holds callbacks for loading an AdManagerInterstitialAd.
AdRequest
Targeting info per the AdMob API.
AdSize
AdSize represents the size of a banner ad.
AdWidget
Displays an Ad as a Flutter widget.
AdWithoutView
An Ad that is overlaid on top of the UI.
AdWithView
Base class for mobile Ad that has an in-line view.
AdWithViewListener
Shared event callbacks used in Native and Banner ads.
AnchoredAdaptiveBannerAdSize
An AdSize with the given width and a Google-optimized height to create a banner ad.
AppEventListener
Listener for app events.
AppOpenAd
A full-screen app open ad for the Google Mobile Ads Plugin.
AppOpenAdLoadCallback
This class holds callbacks for loading an AppOpenAd.
AppStateEventNotifier
Notifies changes in app foreground/background.
BannerAd
A banner ad.
BannerAdListener
A listener for receiving notifications for the lifecycle of a BannerAd.
ConsentDebugSettings
Debug settings to hardcode in test requests.
ConsentForm
A rendered form for collecting consent from a user.
ConsentInformation
Utility methods for collecting consent from users.
ConsentRequestParameters
Parameters sent on updating user consent info.
FluidAdManagerBannerAd
An 'AdManagerBannerAd' that has fluid ad size.
FluidAdSize
A dynamically sized banner that matches its parent's width and content height.
FluidAdWidget
A widget for displaying FluidAdManagerBannerAd.
FormError
Error information about why a form operation failed.
FullScreenAdLoadCallback<T>
Generic parent class for ad load callbacks.
FullScreenContentCallback<Ad>
Callback events for for full screen ads, such as Rewarded and Interstitial.
InitializationStatus
The status of the SDK initialization.
InlineAdaptiveSize
A size for inline adaptive banner ads.
InterstitialAd
A full-screen interstitial ad for the Google Mobile Ads Plugin.
InterstitialAdLoadCallback
This class holds callbacks for loading an InterstitialAd.
LoadAdError
Represents errors that occur when loading an ad.
MaxAdContentRating
Values for RequestConfiguration.maxAdContentRating.
MediationExtras
Contains information for a particular ad network set by developer.
MobileAds
Class contains logic that applies to the Google Mobile Ads SDK as a whole.
NativeAd
A NativeAd.
NativeAdListener
A listener for receiving notifications for the lifecycle of a NativeAd.
NativeAdOptions
Used to configure native ad requests.
NativeTemplateStyle
Style options for native templates.
NativeTemplateTextStyle
Text style options for native templates.
RequestConfiguration
Contains targeting information that can be applied to all ad requests.
ResponseInfo
Contains information about the loaded ad or ad request.
RewardedAd
An Ad where a user has the option of interacting with in exchange for in-app rewards.
RewardedAdLoadCallback
This class holds callbacks for loading a RewardedAd.
RewardedInterstitialAd
Rewarded interstitials are full screen ads that reward users and can be shown without a user opt in.
RewardedInterstitialAdLoadCallback
This class holds callbacks for loading a RewardedInterstitialAd.
RewardItem
Credit information about a reward received from a RewardedAd or RewardedInterstitialAd.
ServerSideVerificationOptions
Options for RewardedAd server-side verification callbacks.
SmartBannerAdSize
Ad units that render screen-width banner ads on any screen size across different devices in either Orientation.
TagForChildDirectedTreatment
Values for RequestConfiguration.tagForChildDirectedTreatment.
TagForUnderAgeOfConsent
Values for RequestConfiguration.tagForUnderAgeOfConsent.
VideoOptions
Options for controlling video playback in supported ad formats.

Enums

AdapterInitializationState
The initialization state of the mediation adapter.
AdChoicesPlacement
Indicates preferred location of AdChoices icon.
AppState
The app foreground/background state.
ConsentStatus
Consent status values.
DebugGeography
Debug values for testing geography.
MediaAspectRatio
Media aspect ratio for native ads.
NativeTemplateFontStyle
Font types for native templates.
PrecisionType
Allowed constants for precision type in OnPaidEventCallback.
PrivacyOptionsRequirementStatus
Values indicate whether a privacy options button is required.
TemplateType
Template types for NativeTemplateStyle.

Typedefs

AdEventCallback = void Function(Ad ad)
The callback type to handle an event occurring for an Ad.
AdLoadErrorCallback = void Function(Ad ad, LoadAdError error)
The callback type to handle an error loading an Ad.
FullScreenAdLoadErrorCallback = void Function(LoadAdError error)
A callback type for when an error occurs loading a full screen ad.
GenericAdEventCallback<Ad> = void Function(Ad ad)
Generic callback type for an event occurring on an Ad.
OnConsentFormDismissedListener = void Function(FormError? formError)
Callback to be invoked when a consent form is dismissed.
OnConsentFormLoadFailureListener = void Function(FormError formError)
Callback to be invoked when a consent form failed to load.
OnConsentFormLoadSuccessListener = void Function(ConsentForm consentForm)
Callback to be invoked when a consent form loads successfully
OnConsentInfoUpdateFailureListener = void Function(FormError error)
Callback to be invoked when consent info failed to update.
OnConsentInfoUpdateSuccessListener = void Function()
Callback to be invoked when consent info is successfully updated.
OnFluidAdHeightChangedListener = void Function(FluidAdManagerBannerAd ad, double height)
The callback type for when a fluid ad's height changes.
OnPaidEventCallback = void Function(Ad ad, double valueMicros, PrecisionType precision, String currencyCode)
The callback type for when an ad receives revenue value.
OnUserEarnedRewardCallback = void Function(AdWithoutView ad, RewardItem reward)
The callback type for when a user earns a reward.