A simple, configurable Flutter wrapper for Google AdMob. One EasyAdMobAds.instance sets up the SDK, GDPR/UMP consent, and a global on/off switch for ads. All six ad formats are supported with their own controller or widget.
Show some ❤️ by giving the repo a ⭐ and liking 👍 the package on pub.dev!
Screenshots
Features
Banner (adaptive, optionally collapsible)
Interstitial
Rewarded
Rewarded Interstitial
App Open (auto-preloaded and shown on app resume)
Native (small/medium templates)
GDPR/UMP consent flow, including the "privacy options" re-consent form
App Tracking Transparency (ATT) consent on iOS 14.5+, requested automatically during initialize()
Network connectivity awareness — ad requests pause while offline and resume as soon as connectivity returns
Any AdType you don't configure automatically falls back to a Google test ad unit ID
(with a warning logged), so the package works out of the box during development.
Usage
// BannerconstEasyBannerAd(collapsible: true, height: 100)
// NativeEasyNativeAd.medium()
// Interstitialfinal interstitialAd = EasyInterstitialAd()..loadAd();
await interstitialAd.showAd();
// Rewardedfinal rewardedAd = EasyRewardedAd(onRewardEarned: (reward) {
// grant the reward
})..loadAd();
await rewardedAd.showAd();
// Rewarded Interstitialfinal rewardedInterstitialAd = EasyRewardedInterstitialAd(onRewardEarned: (reward) {
// grant the reward
})..loadAd();
await rewardedInterstitialAd.showAd();
// App Open — preloaded automatically; show it manually if you want:awaitEasyAdMobAds.instance.appOpenAd?.showAdIfAvailable();
// Turn all ads on/off (e.g. after a "remove ads" purchase)EasyAdMobAds.instance.adsEnabled = false;
// GDPR privacy optionsif (EasyAdMobAds.instance.isPrivacyOptionsRequired) {
EasyAdMobAds.instance.showPrivacyOptionsForm();
}
See the example/ app for a full demo screen with all ad types,
the on/off switch, and the consent button wired up.