पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

GitHub रिपॉज़िटरीhuzaibsayyed/easy_admob_ads_flutter

easy_admob_ads_flutter

एक गूगल एडमोब वापसी फ्लटर पैकेज

easy_admob_ads_flutter प्रोजेक्ट कवर
स्टार
2
फ़ोर्क
4
अंतिम पुश (UTC)
21 अग॰ 2026
प्रोजेक्ट स्थिति
सक्रिय

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

Stand With Palestine

Easy AdMob Integration for Flutter

pub package Pub Points Last Commit Pull Requests Code Size License

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

Static AdMob Demo Animated AdMob Demo Static AdMob Demo

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

Getting started

1. Install
dependencies:
  easy_admob_ads_flutter: ^<latest_version>
2. Platform setup

Add your AdMob App ID:

Android — android/app/src/main/AndroidManifest.xml:

<meta-data
  android:name="com.google.android.gms.ads.APPLICATION_ID"
  android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

iOS — ios/Runner/Info.plist:

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
3. Initialize
void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await EasyAdMobAds.instance.initialize(
    config: const EasyAdsConfig(
      androidAdUnitIds: {
        AdType.banner: 'ca-app-pub-.../...',
        AdType.interstitial: 'ca-app-pub-.../...',
      },
      iosAdUnitIds: {
        AdType.banner: 'ca-app-pub-.../...',
        AdType.interstitial: 'ca-app-pub-.../...',
      },
      testDeviceIds: ['YOUR_TEST_DEVICE_ID'],
    ),
  );

  runApp(const MyApp());
}

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

// Banner
const EasyBannerAd(collapsible: true, height: 100)

// Native
EasyNativeAd.medium()

// Interstitial
final interstitialAd = EasyInterstitialAd()..loadAd();
await interstitialAd.showAd();

// Rewarded
final rewardedAd = EasyRewardedAd(onRewardEarned: (reward) {
  // grant the reward
})..loadAd();
await rewardedAd.showAd();

// Rewarded Interstitial
final rewardedInterstitialAd = EasyRewardedInterstitialAd(onRewardEarned: (reward) {
  // grant the reward
})..loadAd();
await rewardedInterstitialAd.showAd();

// App Open — preloaded automatically; show it manually if you want:
await EasyAdMobAds.instance.appOpenAd?.showAdIfAvailable();

// Turn all ads on/off (e.g. after a "remove ads" purchase)
EasyAdMobAds.instance.adsEnabled = false;

// GDPR privacy options
if (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.

Author

Huzaib Sayyed

GitHub LinkedIn

Huzaib Sayyed GitHub avatar
GitHub लेखक

Huzaib Sayyed ↗

भाषाएँDartSwiftKotlinObjective-C

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 8 आइटम

अपने प्रोजेक्ट के लिए रिपॉज़िटरी कैसे चुनें?

उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।

  1. नाम, लेखक या विवरण से खोजें और तकनीकी विषय से परिणाम सीमित करें।
  2. स्टार, फ़ोर्क और हाल के पुश की तुलना करें। स्टार रुचि दर्शाते हैं, गुणवत्ता की गारंटी नहीं।
  3. उपयोग से पहले GitHub पर README, लाइसेंस और Issues जाँचें।

स्रोत और रखरखाव

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗