Skip to content
pubscout

google_mobile_ads

9.2.0, released 4 weeks ago by google.dev

Flutter plugin to show AdMob banner, interstitial, rewarded and native ads.

$ flutter pub add google_mobile_ads
Source repository

What it does

Provides a Dart API that wraps the Google Mobile Ads SDK for Android and iOS. Lets you load and display various ad formats and configure ad request settings.

AI-written summary of version 9.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to monetize a Flutter app with AdMob or Ad Manager ads
  • You require banner, interstitial, rewarded or native ad support on Android and iOS

Skip it when

  • You prefer a fully open‑source ad solution without Google dependencies
  • You target platforms other than Android or iOS

Strengths

  • Official Google‑maintained plugin
  • Supports all major ad formats
  • Regular updates and bug fixes

Weaknesses

  • Requires native SDK setup and platform‑specific configuration
  • Limited to Google’s ad ecosystem

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
4

Add the plugin to pubspec, run flutter pub get, then follow Android (update AndroidManifest, Gradle) and iOS (add App Transport Security exceptions, update Info.plist) setup steps in the official docs.

import 'package:google_mobile_ads/google_mobile_ads.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  MobileAds.instance.initialize();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  final BannerAd _banner = BannerAd(
    adUnitId: '<YOUR_AD_UNIT_ID>',
    size: AdSize.banner,
    request: AdRequest(),
    listener: BannerAdListener(),
  )..load();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('AdMob Banner')),
        body: Center(child: AdWidget(ad: _banner)),
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace google_mobile_ads.

Works with

Packages commonly used together with google_mobile_ads: ones it builds on, ones built on it, and its own family.