easy_flutter_ads library
A production-grade AdMob wrapper for Flutter.
Wraps google_mobile_ads with the parts every real app ends up writing:
preloading with TTL and backoff, AdMob-policy-safe App Open placement, UMP
consent ordering, adaptive banners, and impression-level revenue events.
Classes
- AdSize
- AdSize represents the size of a banner ad.
- AppOpenAdManager
- App Open ads — the format with the strictest placement rules.
- ConsentManager
- Google User Messaging Platform (UMP) consent, wrapped so that consent is always gathered before the first ad request.
- EasyAdEvent
- A lifecycle event emitted by the package.
- EasyAdRevenue
- Impression-level ad revenue, reported by the SDK's paid event callback.
- EasyAdReward
- What the user earned from a rewarded (interstitial) ad.
- EasyAds
- The package entry point.
- EasyAdsConfig
- Everything the package needs to know, in one immutable object.
- EasyAdsStore
- Persistence hook for the values that must survive an app restart: the number of sessions so far, daily caps, the rolling hourly windows, and the last impression of each cooldown-gated format.
- EasyAdUnitIds
- Per-platform AdMob ad unit IDs.
- EasyBannerAd
- A self-managing banner: it loads on mount, reloads when the available width changes (rotation, split screen), disposes itself, and renders nothing at all until an ad is actually on screen.
-
FullScreenAdManager<
T extends AdWithoutView> - Shared machinery for every full screen format: single-flight loading, TTL bookkeeping, timeout, capped exponential backoff, and a show path that can never throw.
- InterstitialAdManager
- Interstitial ads.
- MaxAdContentRating
-
Values for
RequestConfiguration.maxAdContentRating. - MemoryEasyAdsStore
- In-memory EasyAdsStore. Everything it holds dies with the process, so session thresholds, daily caps and hourly windows reset on every cold start.
- PrefsEasyAdsStore
-
The default EasyAdsStore:
shared_preferences, so session counts, daily caps, hourly windows and cooldowns survive a cold start without the host app wiring up anything. - RewardedAdManager
- Rewarded ads — the user opts in and gets something back.
- RewardedInterstitialAdManager
- Rewarded interstitials: a full screen ad with a reward, shown at a natural transition after an intro screen announcing it.
- TagForChildDirectedTreatment
-
Values for
RequestConfiguration.tagForChildDirectedTreatment. - TagForUnderAgeOfConsent
-
Values for
RequestConfiguration.tagForUnderAgeOfConsent.
Enums
- AppState
- The app foreground/background state.
- EasyAdEventType
- What happened to an ad.
- EasyAdFormat
- The ad formats managed by this package.
- EasyAdSkipReason
- Why a show request was skipped.
- EasyBannerCollapse
- Which edge a collapsible banner collapses towards.
- EasyBannerType
- How an EasyBannerAd sizes itself.