Package selection guidance compiled from public package information, community data, and project usage.
A Flutter plugin that enables integration with Google Ad Manager (formerly DoubleClick for Publishers), allowing developers to serve ads within their Flutter applications. It provides a bridge to native ad SDKs, supporting banner, interstitial, and rewarded video ads. The plugin simplifies ad implementation with straightforward APIs while maintaining compatibility across platforms. It is designed for apps aiming to monetize through programmatic advertising via Google's ecosystem.
Use cases
Monetizing mobile apps with display ads
Implementing rewarded video ads for user engagement
Displaying banner ads in app layouts
Integrating interstitial ads between app screens
Serving targeted ads using Google Ad Manager
Enabling ad revenue through programmatic bidding
Key features
Supports banner, interstitial, and rewarded video ads
Easy integration with Google Ad Manager
Cross-platform ad serving
Real-time ad fetching and rendering
Ad event callbacks for tracking performance
Compliant with Google AdMob policies
Suitable for
Apps seeking ad-based monetization
Developers using Google Ad Manager for ad inventory
Flutter apps targeting global audiences
Publishers managing multiple ad networks
Apps requiring high ad fill rates
Projects needing reliable ad performance tracking
Considerations
Requires Google Ad Manager account setup
Needs proper ad unit IDs from the publisher dashboard
May require compliance with privacy regulations like GDPR
Performance depends on network connectivity
Ad content must follow Google's ad policies
Additional configuration needed for iOS and Android manifest files
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
flutter_google_ad_manager
Flutter plugin for Google Ad Manager(DoubleClick for Publishers).
Getting Started
ios
Add io.flutter.embedded_views_preview in info.plist
You can manually refresh the banner ads on user interaction, use the onAdViewCreated callback to save an instance of the DFPBannerViewController and then call the reload() method to refresh the ad.
If you set isDevelop to true, the test adUnitId will be used.
( If set false, the described adUnitId is used.)
Google Ad Manger needs to register testDevices in case of actual devices.
With this plug-in, you can create the following class and set it to testDevices of DFPBanner.
classMyTestDevicesextendsTestDevices{
staticMyTestDevices _instance;
factoryMyTestDevices() {
if (_instance == null) _instance = newMyTestDevices._internal();
return _instance;
}
MyTestDevices._internal();
@overrideList<String> get values => List()..add("XXXXXXXX"); // Set here.
}
DFPBanner(
testDevices: MyTestDevices(),
)
About adSize
DFPAdSize is available. This is the same size as that of android.