A Flutter plugin for the Google Mobile Ads SDK

Overview

Google Mobile Ads for Flutter

This guide is intended for publishers who want to monetize a Flutter app.

Integrating Google Mobile Ads SDK into a Flutter app, which you will do here, is the first step towards displaying AdMob ads and earning revenue. Once the integration is complete, you can choose an ad format to get detailed implementation steps.

The Google Mobile Ads SDK for Flutter currently supports loading and displaying banner, interstitial (full-screen), native ads, and rewarded video ads.

Note: This plugin also contains support for Google Ad Manager. If you are interested in creating and loading an Ad with Ad Manager, you may follow the same prerequisites, platform setup, mobile ads SDK initialization steps outlined in this doc, and then see creating and loading an ad with Ad Manager for further instructions.

See also the codelab for inline ads in Flutter for a detailed guide on setting inline banner and native ads.

Prerequisites

Import the Mobile Ads SDK

Platform Specific Setup

iOS

Update your Info.plist

Update your app's ios/Runner/Info.plist file to add two keys:

  • A GADApplicationIdentifier key with a string value of your AdMob app ID (identified in the AdMob UI).
  • A SKAdNetworkItems key with Google's SKAdNetworkIdentifier value of cstr6suwn9.skadnetwork.
<key>GADApplicationIdentifierkey>
<string>ca-app-pub-3940256099942544~1458002511string>
<key>SKAdNetworkItemskey>
  <array>
    <dict>
      <key>SKAdNetworkIdentifierkey>
      <string>cstr6suwn9.skadnetworkstring>
    dict>
  array>

See https://developers.google.com/admob/ios/quick-start#update\_your\_infoplist for more information about configuring Info.plist and setting up your App ID.

Android

Update AndroidManifest.xml

The AdMob App ID must be included in the AndroidManifest.xml. Failure to do so will result in a crash on launch of an app.

Add the AdMob App ID (identified in the AdMob UI) to the app's android/app/src/main/AndroidManifest.xml file by adding a tag with name com.google.android.gms.ads.APPLICATION_ID, as shown below. You can find your App ID in the AdMob UI. For android:value insert your own AdMob App ID in quotes, as shown below.

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

The same value when you initialize the plugin in your Dart code.

See https://goo.gl/fQ2neu for more information about configuring AndroidManifest.xml and setting up the App ID.

Initialize the Mobile Ads SDK

Before loading ads, have your app initialize the Mobile Ads SDK by calling MobileAds.instance.initialize() which initializes the SDK and returns a Future that finishes once initialization is complete (or after a 30-second timeout). This needs to be done only once, ideally right before running the app.

import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:flutter/material.dart';

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

  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    // Load ads.
  }
}

Select an Ad Format

The Mobile Ads SDK is now imported and you're ready to implement an ad. AdMob offers a number of different ad formats, so you can choose the one that best fits your app's user experience.

  • Banner
    • Rectangular ads that appear at the top or bottom of the device screen. Banner ads stay on screen while users are interacting with the app, and can refresh automatically after a certain period of time. If you're new to mobile advertising, they're a great place to start.
  • Interstitial
    • Full-screen ads that cover the interface of an app until closed by the user. They're best used at natural pauses in the flow of an app's execution, such as between levels of a game or just after a task is completed.
  • Native Ads
    • Customizable ads that match the look and feel of your app. You decide how and where they're placed, so the layout is more consistent with your app's design.
  • Rewarded
    • Ads that reward users for watching short videos and interacting with playable ads and surveys. Good for monetizing free-to-play users.

Banner Ads

Banner ads occupy a spot within an app's layout, either at the top or bottom of the device screen. They stay on screen while users are interacting with the app, and can refresh automatically after a certain period of time.

This guide shows you how to integrate banner ads from AdMob into a Flutter app. In addition to code snippets and instructions, it also includes information about sizing banners properly and links to additional resources.

See also the codelab for inline ads in Flutter for a detailed guide on setting up banner ads.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for banners:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Banner Ad

A BannerAd requires an adUnitId, an AdSize, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final BannerAd myBanner = BannerAd(
  adUnitId: '',
  size: AdSize.banner,
  request: AdRequest(),
  listener: AdListener(),
);

Banner Sizes

The table below lists the standard banner sizes.

Size in dp (WxH) Description AdSize Constant
320x50 Standard Banner banner
320x100 Large Banner largeBanner
320x250 Medium Rectangle mediumRectangle
468x60 Full-Size Banner fullBanner
728x90 Leaderboard leaderboard
Screen width x 32|50|90 Smart Banner Use getSmartBanner(Orientation)

To define a custom banner size, set your desired AdSize, as shown here:

final AdSize adSize = AdSize(300, 50);

Banner Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) => print('Ad closed.'),
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
);

Load Banner Ad

After a BannerAd is instantiated, load() must be called before it can be shown on the screen.

myBanner.load();

Display a Banner Ad

To display a BannerAd as a widget, you must instantiate an AdWidget with a supported ad after calling load(). You can create the widget before calling load(), but load() must be called before adding it to the widget tree.

final AdWidget adWidget = AdWidget(ad: myBanner);

AdWidget inherits from Flutter's Widget class and can be used as any other widget. On iOS, make sure you place the widget in a widget with a specified width and height. Otherwise, your Ad may not be displayed. A BannerAd can be placed in a container with a size that matches the ad:

final Container adContainer = Container(
  alignment: Alignment.center,
  child: adWidget,
  width: myBanner.size.width.toDouble(),
  height: myBanner.size.height.toDouble(),
);

Once an Ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is either after the AdWidget is removed from the widget tree or in the AdListener.onAdFailedToLoad callback.

That's it! Your app is now ready to display banner ads.

Interstitial Ad

Interstitial ads are full-screen ads that cover the interface of their host app. They're typically displayed at natural transition points in the flow of an app, such as between activities or during the pause between levels in a game. When an app shows an interstitial ad, the user has the choice to either tap on the ad and continue to its destination or close it and return to the app.

This guide explains how to integrate interstitial ads into a Flutter app.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for interstitials:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate an Interstitial Ad

An InterstitialAd requires an adUnitId, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final InterstitialAd myInterstitial = InterstitialAd(
  adUnitId: '',
  request: AdRequest(),
  listener: AdListener(),
);

Interstitial Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) {
   ad.dispose();
   print('Ad closed.');
 },
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
);

Load Interstitial Ad

After an InterstitialAd is instantiated, load() must be called before it can be shown on the screen.

myInterstitial.load();

Display an Interstitial Ad

An InterstitialAd is displayed as an Overlay on top of all app content and is statically placed. Which means it can not be added to the Flutter widget tree. You can choose when to show the add by calling show() after the ad is loaded.

myInterstitial.show();

This method should only be called after load() and the AdListener.onAdLoaded method has been triggered. Once show() is called, an Ad displayed this way can't be removed programmatically and requires user input. Do not call show() more than once for a loaded InterstitialAd. Instead you should load a new ad.

Once an ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is in the AdListener.onAdFailedToLoad/AdListener.onAdClosed callbacks.

That's it! Your app is now ready to display interstitial ads.

Next steps

Native Ads

Native ads are ad assets that are presented to users via UI components that are native to the platform. They're shown using the same types of views with which you're already building your layouts, and can be formatted to match the visual design of the user experience in which they live. In coding terms, this means that when a native ad loads, your app receives a NativeAd object that contains its assets, and the app (rather than the Google Mobile Ads SDK) is then responsible for displaying them.

Broadly speaking, there are two parts to successfully implementing Native Ads: loading an ad via the SDK and displaying the ad content in your app. This guide is concerned with using the SDK to load native ads.

See also the codelab for inline ads in Flutter for a detailed guide on setting up native ads.

Platform Setup

Native Ads are presented to users via UI components that are native to the platform. (e.g. A View on Android or a UIView on iOS).

Since Native Ads require UI components native to a platform, this feature requires additional setup for Android and iOS:

Android

The Android implementation of the Google Mobile Ads plugin requires a class that implements a NativeAdFactory. A NativeAdFactory contains a method that takes a UnifiedNativeAd and custom options and returns a UnifiedNativeAdView. The UnifiedNativeAdView is what will be displayed in your app.

You can implement this in your MainActivity.java or create a separate class in the same directory as MainActivity.java as seen below:

package my.app.path;

import com.google.android.gms.ads.formats.UnifiedNativeAd;
import com.google.android.gms.ads.formats.UnifiedNativeAdView;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.NativeAdFactory;
import java.util.Map;

class NativeAdFactoryExample implements NativeAdFactory {
  @Override
  public UnifiedNativeAdView createNativeAd(
      UnifiedNativeAd nativeAd, Map<String, Object> customOptions) {
    // Create UnifiedNativeAdView
  }
}

Each NativeAdFactory needs to be registered with a factoryId, a unique String identifier, in MainActivity.configureFlutterEngine(FlutterEngine). A NativeAdFactory can be implemented and registered for each unique Native ad layout used by your app or a single one can handle all layouts. The NativeAdFactory should also be unregistered in cleanUpFlutterEngine(engine) when building with add-to-app.

MainActivity.java should look similar to:

package my.app.path;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin;

public class MainActivity extends FlutterActivity {
  @Override
  public void configureFlutterEngine(FlutterEngine flutterEngine) {
    flutterEngine.getPlugins().add(new GoogleMobileAdsPlugin());
   super.configureFlutterEngine(flutterEngine);

    GoogleMobileAdsPlugin.registerNativeAdFactory(flutterEngine, "adFactoryExample", NativeAdFactoryExample());
  }

  @Override
  public void cleanUpFlutterEngine(FlutterEngine flutterEngine) {
    GoogleMobileAdsPlugin.unregisterNativeAdFactory(flutterEngine, "adFactoryExample");
  }
}

When creating the NativeAd in Dart, the factoryId will need to match the one used to add the factory to GoogleMobileAdsPlugin. In the above code snippet, adFactoryExample is the name of the factoryId. An example NativeAdFactory follows:

package io.flutter.plugins.googlemobileadsexample;

import android.graphics.Color;
import android.view.LayoutInflater;
import android.widget.TextView;
import com.google.android.gms.ads.formats.UnifiedNativeAd;
import com.google.android.gms.ads.formats.UnifiedNativeAdView;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.NativeAdFactory;
import java.util.Map;

// my_native_ad.xml can be found at
/* https://github.com/googleads/googleads-mobile-flutter/tree/master/packages/google_mobile_ads/example/android/app/src/main/res/layout
*/
class NativeAdFactoryExample implements NativeAdFactory {
 private final LayoutInflater layoutInflater;

 NativeAdFactoryExample(LayoutInflater layoutInflater) {
   this.layoutInflater = layoutInflater;
 }

 @Override
 public UnifiedNativeAdView createNativeAd(
     UnifiedNativeAd nativeAd, Map<String, Object> customOptions) {
   final UnifiedNativeAdView adView =
       (UnifiedNativeAdView) layoutInflater.inflate(R.layout.my_native_ad, null);
   final TextView headlineView = adView.findViewById(R.id.ad_headline);
   final TextView bodyView = adView.findViewById(R.id.ad_body);

   headlineView.setText(nativeAd.getHeadline());
   bodyView.setText(nativeAd.getBody());

   adView.setBackgroundColor(Color.YELLOW);

   adView.setNativeAd(nativeAd);
   adView.setBodyView(bodyView);
   adView.setHeadlineView(headlineView);
   return adView;
 }
}

iOS

The iOS implementation of the Google Mobile Ads plugin requires a class that implements a FLTNativeAdFactory. A FLTNativeAdFactory contains a method that takes a GADUnifiedNativeAd and custom options and returns a GADUnifiedNativeAdView. The GADUnifiedNativeAdView is what will be displayed in your app.

The FLTNativeAdFactory protocol can be implemented by AppDelegate or a separate class could be created as seen below:

/* AppDelegate.m */
#import "FLTGoogleMobileAdsPlugin.h"
@interface NativeAdFactoryExample : NSObject
@end

@implementation NativeAdFactoryExample
- (GADUnifiedNativeAdView *)createNativeAd:(GADUnifiedNativeAd *)nativeAd
                             customOptions:(NSDictionary *)customOptions {
  // Create GADUnifiedNativeAdView
}
@end

Each FLTNativeAdFactory needs to be registered with a factoryId, a unique String identifier, in registerNativeAdFactory:factoryId:nativeAdFactory:. A FLTNativeAdFactory can be implemented and registered for each unique Native ad layout used by your app or a single one can handle all layouts. This is done by importing FLTGoogleMobileAdsPlugin.h and calling registerNativeAdFactory:factoryId:nativeAdFactory: with a FlutterPluginRegistry, a unique identifier for the factory, and the factory itself. The factory also MUST be added after [GeneratedPluginRegistrant registerWithRegistry:self]; has been called.

If this is done in AppDelegate.m, it should look similar to:

#import "FLTGoogleMobileAdsPlugin.h"

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GeneratedPluginRegistrant registerWithRegistry:self];

  NativeAdFactoryExample *nativeAdFactory = [[NativeAdFactoryExample alloc] init];
  [FLTGoogleMobileAdsPlugin registerNativeAdFactory:self
                                        factoryId:@"adFactoryExample"
                                  nativeAdFactory:nativeAdFactory];

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end

When creating the NativeAd in Dart, the factoryID will need to match the one used to add the factory to FLTGoogleMobileAdsPlugin. In the above code snippet, adFactoryExample is the name of the factoryID.An exampleFLTNativeAdFactory` follows:

// The example UnifiedNativeAdView.xib can be found at
/* https://github.com/googleads/googleads-mobile-flutter/blob/master/packages/google_mobile_ads/example/ios/Runner/UnifiedNativeAdView.xib
*/
@interface NativeAdFactoryExample : NSObject 
@end

@implementation NativeAdFactoryExample
- (GADUnifiedNativeAdView *)createNativeAd:(GADUnifiedNativeAd *)nativeAd
                            customOptions:(NSDictionary *)customOptions {
 // Create and place ad in view hierarchy.
 GADUnifiedNativeAdView *adView =
     [[NSBundle mainBundle] loadNibNamed:@"UnifiedNativeAdView" owner:nil options:nil].firstObject;

 // Associate the native ad view with the native ad object. This is
 // required to make the ad clickable.
 adView.nativeAd = nativeAd;

 // Populate the native ad view with the native ad assets.
 // The headline is guaranteed to be present in every native ad.
 ((UILabel *)adView.headlineView).text = nativeAd.headline;

 // These assets are not guaranteed to be present. Check that they are before
 // showing or hiding them.
 ((UILabel *)adView.bodyView).text = nativeAd.body;
 adView.bodyView.hidden = nativeAd.body ? NO : YES;

 [((UIButton *)adView.callToActionView) setTitle:nativeAd.callToAction
                                        forState:UIControlStateNormal];
 adView.callToActionView.hidden = nativeAd.callToAction ? NO : YES;

 ((UIImageView *)adView.iconView).image = nativeAd.icon.image;
 adView.iconView.hidden = nativeAd.icon ? NO : YES;

 ((UILabel *)adView.storeView).text = nativeAd.store;
 adView.storeView.hidden = nativeAd.store ? NO : YES;

 ((UILabel *)adView.priceView).text = nativeAd.price;
 adView.priceView.hidden = nativeAd.price ? NO : YES;

 ((UILabel *)adView.advertiserView).text = nativeAd.advertiser;
 adView.advertiserView.hidden = nativeAd.advertiser ? NO : YES;

 // In order for the SDK to process touch events properly, user interaction
 // should be disabled.
 adView.callToActionView.userInteractionEnabled = NO;

 return adView;
}
@end

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for native ads:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Native Ad

A NativeAd requires an adUnitId, a factoryId, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final NativeAd myNative = NativeAd(
  adUnitId: '',
  factoryId: 'adFactoryExample',
  request: AdRequest(),
  listener: AdListener(),
);

Factory Id

The factoryId will need to match the one used to add the factory to GoogleMobileAdsPlugin on Android and/or the FLTGoogleMobileAdsPlugin on iOS. The same factoryId can be used by both platforms or each can have their own.

Native Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) => print('Ad closed.'),
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
 // Called when a click is recorded for a NativeAd.
 onNativeAdClicked: (NativeAd ad) => print('Ad clicked.'),
 // Called when an impression is recorded for a NativeAd.
 onNativeAdImpression: (NativeAd ad) => print('Ad impression.'),
);

Load Native Ad

After a NativeAd is instantiated, load() must be called before it can be shown on the screen.

myNative.load();

Display a Native Ad

To display a NativeAd as a widget, you must instantiate an AdWidget with a supported ad after calling load(). You can create the widget before calling load(), but load() must be called before adding it to the widget tree.

final AdWidget adWidget = AdWidget(ad: myNative);

AdWidget inherits from Flutter's Widget class and can be used as any other widget. On iOS, make sure you place the widget in a widget with a specified width and height. Otherwise, your Ad may not be displayed.

final Container adContainer = Container(
  alignment: Alignment.center,
  child: adWidget,
  width: 500,
  height: 500,
);

Once an Ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is either after the AdWidget is removed from the widget tree or in the AdListener.onAdFailedToLoad callback.

That's it! Your app is now ready to display native ads.

Next steps

Rewarded Ads

Rewarded ads are ads that users have the option of interacting with in exchange for in-app rewards. This guide shows you how to integrate rewarded ads from AdMob into a Flutter app.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for rewarded:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Rewarded Ad

A RewardedAd requires an adUnitId, an AdRequest, and an AdListener with the onRewardedAdUserEarnedReward callback implemented. An example is shown below as well as more information on each parameter following.

final RewardedAd myRewarded = RewardedAd(
 adUnitId: '',
 request: AdRequest(),
 listener: AdListener(
   onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {
     print(reward.type);
     print(reward.amount);
   },
 ),
);

Rewarded Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) {
   ad.dispose();
   print('Ad closed.');
 },
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
 // Called when a RewardedAd triggers a reward.
 onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {
   print('Reward earned: $reward');
 },
);

Key Point: Make sure to implement the onRewardedAdUserEarnedReward event to reward the user for watching an ad.

Load Rewarded Ad

After a RewardedAd is instantiated, load() must be called before it can be shown on the screen.

myRewarded.load();

Display a RewardedAd

A RewardedAd is displayed as an Overlay is displayed on top of all app content and is statically placed. Which means it can not be displayed this way can't be added to the Flutter widget tree. You can choose when to show the add by calling show() after the ad is loaded.

myRewarded.show();

This method should only be called after load() and the AdListener.onAdLoaded method has been triggered. Once show() is called, an Ad displayed this way can't be removed programmatically and require user input. Do not call show() more than once for a loaded RewardedAd. Instead you should load a new ad.

Once an ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is in the AdListener.onAdFailedToLoad and AdListener.onAdClosed and callbacks.

That's it! Your app is now ready to display rewarded ads.

Creating and Loading an Ad with Ad Manager

This section shows how to create and load ads with Google Ad Manager.

Select an Ad Format

  • Banner
    • Rectangular ads that appear at the top or bottom of the device screen. Banner ads stay on screen while users are interacting with the app, and can refresh automatically after a certain period of time. If you're new to mobile advertising, they're a great place to start.
  • Interstitial
    • Full-screen ads that cover the interface of an app until closed by the user. They're best used at natural pauses in the flow of an app's execution, such as between levels of a game or just after a task is completed.
  • Native Ads
    • Customizable ads that match the look and feel of your app. You decide how and where they're placed, so the layout is more consistent with your app's design.
  • Rewarded
    • Ads that reward users for watching short videos and interacting with playable ads and surveys. Good for monetizing free-to-play users.

PublisherAdRequest

For Ad Manager you will be using PublisherAdRequest instead of AdRequest. PublisherAdRequest is similar to AdRequest but has two additional properties: customTargeting and customTargetingLists, which are used to support custom targeting.

final PublisherAdRequest request = PublisherAdRequest(
  keywords: ['flutterio', 'beautiful apps'],
  contentUrl: 'https://flutter.dev',
  customTargeting: {'some', 'targeting'},
  customTargetingLists: >{'favoriteColors': ['red', 'yellow']},
);

Ad Manager Banner Ads

Banner ads occupy a spot within an app's layout, either at the top or bottom of the device screen. They stay on screen while users are interacting with the app, and can refresh automatically after a certain period of time.

This guide shows you how to integrate banner ads from Ad Manager into a Flutter app. In addition to code snippets and instructions, it also includes information about sizing banners properly and links to additional resources.

See also the codelab for inline ads in Flutter for a detailed guide on setting up banner ads.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for banners:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Banner Ad

A PublisherBannerAd requires an adUnitId, an AdSize, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final PublisherBannerAd myBanner = PublisherBannerAd(
  adUnitId: '',
  size: AdSize.banner,
  request: PublisherAdRequest(),
  listener: AdListener(),
);

Banner Sizes

The table below lists the standard banner sizes.

Size in dp (WxH) Description AdSize Constant
320x50 Standard Banner banner
320x100 Large Banner largeBanner
320x250 Medium Rectangle mediumRectangle
468x60 Full-Size Banner fullBanner
728x90 Leaderboard leaderboard
Screen width x 32|50|90 Smart Banner Use getSmartBanner(Orientation)

To define a custom banner size, set your desired AdSize, as shown here:

final AdSize adSize = AdSize(300, 50);

Banner Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) => print('Ad closed.'),
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
);

Load Banner Ad

After a PublisherBannerAd is instantiated, load() must be called before it can be shown on the screen.

myBanner.load();

Display a Banner Ad

To display a PublisherBannerAd as a widget, you must instantiate an AdWidget with a supported ad after calling load(). You can create the widget before calling load(), but load() must be called before adding it to the widget tree.

final AdWidget adWidget = AdWidget(ad: myBanner);

AdWidget inherits from Flutter's Widget class and can be used as any other widget. On iOS, make sure you place the widget in a widget with a specified width and height. Otherwise, your Ad may not be displayed. A PublisherBannerAd can be placed in a container with a size that matches the ad:

final Container adContainer = Container(
  alignment: Alignment.center,
  child: adWidget,
  width: myBanner.size.width.toDouble(),
  height: myBanner.size.height.toDouble(),
);

Once an Ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is either after the AdWidget is removed from the widget tree or in the AdListener.onAdFailedToLoad callback.

That's it! Your app is now ready to display banner ads.

Ad Manager Interstitial Ad

Interstitial ads are full-screen ads that cover the interface of their host app. They're typically displayed at natural transition points in the flow of an app, such as between activities or during the pause between levels in a game. When an app shows an interstitial ad, the user has the choice to either tap on the ad and continue to its destination or close it and return to the app.

This guide explains how to integrate interstitial ads into a Flutter app.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for interstitials:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate an Interstitial Ad

A PublisherInterstitialAd requires an adUnitId, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final PublisherInterstitialAd myInterstitial = PublisherInterstitialAd(
  adUnitId: '',
  request: PublisherAdRequest(),
  listener: AdListener(),
);

Interstitial Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) {
   ad.dispose();
   print('Ad closed.');
 },
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
);

Load Interstitial Ad

After a PublisherInterstitialAd is instantiated, load() must be called before it can be shown on the screen.

myInterstitial.load();

Display an Interstitial Ad

A PublisherInterstitialAd is displayed as an Overlay on top of all app content and is statically placed. Which means it can not be added to the Flutter widget tree. You can choose when to show the add by calling show() after the ad is loaded.

myInterstitial.show();

This method should only be called after load() and the AdListener.onAdLoaded method has been triggered. Once show() is called, an Ad displayed this way can't be removed programmatically and requires user input. Do not call show() more than once for a loaded PublisherInterstitialAd. Instead you should load a new ad.

Once an ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is in the AdListener.onAdFailedToLoad/AdListener.onAdClosed callbacks.

That's it! Your app is now ready to display interstitial ads.

Next steps

Ad Manager Native Ads

Native ads are ad assets that are presented to users via UI components that are native to the platform. They're shown using the same types of views with which you're already building your layouts, and can be formatted to match the visual design of the user experience in which they live. In coding terms, this means that when a native ad loads, your app receives a NativeAd object that contains its assets, and the app (rather than the Google Mobile Ads SDK) is then responsible for displaying them.

Broadly speaking, there are two parts to successfully implementing Native Ads: loading an ad via the SDK and displaying the ad content in your app. This guide is concerned with using the SDK to load native ads.

See also the codelab for inline ads in Flutter for a detailed guide on setting up native ads.

Platform Setup

Native Ads are presented to users via UI components that are native to the platform. (e.g. A View on Android or a UIView on iOS).

Since Native Ads require UI components native to a platform, this feature requires additional setup for Android and iOS:

Android

The Android implementation of the Google Mobile Ads plugin requires a class that implements a NativeAdFactory. A NativeAdFactory contains a method that takes a UnifiedNativeAd and custom options and returns a UnifiedNativeAdView. The UnifiedNativeAdView is what will be displayed in your app.

You can implement this in your MainActivity.java or create a separate class in the same directory as MainActivity.java as seen below:

package my.app.path;

import com.google.android.gms.ads.formats.UnifiedNativeAd;
import com.google.android.gms.ads.formats.UnifiedNativeAdView;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.NativeAdFactory;
import java.util.Map;

class NativeAdFactoryExample implements NativeAdFactory {
  @Override
  public UnifiedNativeAdView createNativeAd(
      UnifiedNativeAd nativeAd, Map<String, Object> customOptions) {
    // Create UnifiedNativeAdView
  }
}

Each NativeAdFactory needs to be registered with a factoryId, a unique String identifier, in MainActivity.configureFlutterEngine(FlutterEngine). A NativeAdFactory can be implemented and registered for each unique Native ad layout used by your app or a single one can handle all layouts. The NativeAdFactory should also be unregistered in cleanUpFlutterEngine(engine) when building with add-to-app.

MainActivity.java should look similar to:

package my.app.path;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin;

public class MainActivity extends FlutterActivity {
  @Override
  public void configureFlutterEngine(FlutterEngine flutterEngine) {
    flutterEngine.getPlugins().add(new GoogleMobileAdsPlugin());
   super.configureFlutterEngine(flutterEngine);

    GoogleMobileAdsPlugin.registerNativeAdFactory(flutterEngine, "adFactoryExample", NativeAdFactoryExample());
  }

  @Override
  public void cleanUpFlutterEngine(FlutterEngine flutterEngine) {
    GoogleMobileAdsPlugin.unregisterNativeAdFactory(flutterEngine, "adFactoryExample");
  }
}

When creating the NativeAd in Dart, the factoryId will need to match the one used to add the factory to GoogleMobileAdsPlugin. In the above code snippet, adFactoryExample is the name of the factoryId. An example NativeAdFactory follows:

package io.flutter.plugins.googlemobileadsexample;

import android.graphics.Color;
import android.view.LayoutInflater;
import android.widget.TextView;
import com.google.android.gms.ads.formats.UnifiedNativeAd;
import com.google.android.gms.ads.formats.UnifiedNativeAdView;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.NativeAdFactory;
import java.util.Map;

// my_native_ad.xml can be found at
/* https://github.com/googleads/googleads-mobile-flutter/tree/master/packages/google_mobile_ads/example/android/app/src/main/res/layout
*/
class NativeAdFactoryExample implements NativeAdFactory {
 private final LayoutInflater layoutInflater;

 NativeAdFactoryExample(LayoutInflater layoutInflater) {
   this.layoutInflater = layoutInflater;
 }

 @Override
 public UnifiedNativeAdView createNativeAd(
     UnifiedNativeAd nativeAd, Map<String, Object> customOptions) {
   final UnifiedNativeAdView adView =
       (UnifiedNativeAdView) layoutInflater.inflate(R.layout.my_native_ad, null);
   final TextView headlineView = adView.findViewById(R.id.ad_headline);
   final TextView bodyView = adView.findViewById(R.id.ad_body);

   headlineView.setText(nativeAd.getHeadline());
   bodyView.setText(nativeAd.getBody());

   adView.setBackgroundColor(Color.YELLOW);

   adView.setNativeAd(nativeAd);
   adView.setBodyView(bodyView);
   adView.setHeadlineView(headlineView);
   return adView;
 }
}

iOS

The iOS implementation of the Google Mobile Ads plugin requires a class that implements a FLTNativeAdFactory. A FLTNativeAdFactory contains a method that takes a GADUnifiedNativeAd and custom options and returns a GADUnifiedNativeAdView. The GADUnifiedNativeAdView is what will be displayed in your app.

The FLTNativeAdFactory protocol can be implemented by AppDelegate or a separate class could be created as seen below:

/* AppDelegate.m */
#import "FLTGoogleMobileAdsPlugin.h"
@interface NativeAdFactoryExample : NSObject
@end

@implementation NativeAdFactoryExample
- (GADUnifiedNativeAdView *)createNativeAd:(GADUnifiedNativeAd *)nativeAd
                             customOptions:(NSDictionary *)customOptions {
  // Create GADUnifiedNativeAdView
}
@end

Each FLTNativeAdFactory needs to be registered with a factoryId, a unique String identifier, in registerNativeAdFactory:factoryId:nativeAdFactory:. A FLTNativeAdFactory can be implemented and registered for each unique Native ad layout used by your app or a single one can handle all layouts. This is done by importing FLTGoogleMobileAdsPlugin.h and calling registerNativeAdFactory:factoryId:nativeAdFactory: with a FlutterPluginRegistry, a unique identifier for the factory, and the factory itself. The factory also MUST be added after [GeneratedPluginRegistrant registerWithRegistry:self]; has been called.

If this is done in AppDelegate.m, it should look similar to:

#import "FLTGoogleMobileAdsPlugin.h"

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GeneratedPluginRegistrant registerWithRegistry:self];

  NativeAdFactoryExample *nativeAdFactory = [[NativeAdFactoryExample alloc] init];
  [FLTGoogleMobileAdsPlugin registerNativeAdFactory:self
                                        factoryId:@"adFactoryExample"
                                  nativeAdFactory:nativeAdFactory];

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end

When creating the NativeAd in Dart, the factoryID will need to match the one used to add the factory to FLTGoogleMobileAdsPlugin. In the above code snippet, adFactoryExample is the name of the factoryID.An exampleFLTNativeAdFactory` follows:

// The example UnifiedNativeAdView.xib can be found at
/* https://github.com/googleads/googleads-mobile-flutter/blob/master/packages/google_mobile_ads/example/ios/Runner/UnifiedNativeAdView.xib
*/
@interface NativeAdFactoryExample : NSObject 
@end

@implementation NativeAdFactoryExample
- (GADUnifiedNativeAdView *)createNativeAd:(GADUnifiedNativeAd *)nativeAd
                            customOptions:(NSDictionary *)customOptions {
 // Create and place ad in view hierarchy.
 GADUnifiedNativeAdView *adView =
     [[NSBundle mainBundle] loadNibNamed:@"UnifiedNativeAdView" owner:nil options:nil].firstObject;

 // Associate the native ad view with the native ad object. This is
 // required to make the ad clickable.
 adView.nativeAd = nativeAd;

 // Populate the native ad view with the native ad assets.
 // The headline is guaranteed to be present in every native ad.
 ((UILabel *)adView.headlineView).text = nativeAd.headline;

 // These assets are not guaranteed to be present. Check that they are before
 // showing or hiding them.
 ((UILabel *)adView.bodyView).text = nativeAd.body;
 adView.bodyView.hidden = nativeAd.body ? NO : YES;

 [((UIButton *)adView.callToActionView) setTitle:nativeAd.callToAction
                                        forState:UIControlStateNormal];
 adView.callToActionView.hidden = nativeAd.callToAction ? NO : YES;

 ((UIImageView *)adView.iconView).image = nativeAd.icon.image;
 adView.iconView.hidden = nativeAd.icon ? NO : YES;

 ((UILabel *)adView.storeView).text = nativeAd.store;
 adView.storeView.hidden = nativeAd.store ? NO : YES;

 ((UILabel *)adView.priceView).text = nativeAd.price;
 adView.priceView.hidden = nativeAd.price ? NO : YES;

 ((UILabel *)adView.advertiserView).text = nativeAd.advertiser;
 adView.advertiserView.hidden = nativeAd.advertiser ? NO : YES;

 // In order for the SDK to process touch events properly, user interaction
 // should be disabled.
 adView.callToActionView.userInteractionEnabled = NO;

 return adView;
}
@end

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for native ads:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Native Ad

A NativeAd requires an adUnitId, a factoryId, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final NativeAd myNative = NativeAd.fromPublisherRequest(
  adUnitId: '',
  factoryId: 'adFactoryExample',
  request: PublisherAdRequest(),
  listener: AdListener(),
);

Factory Id

The factoryId will need to match the one used to add the factory to GoogleMobileAdsPlugin on Android and/or the FLTGoogleMobileAdsPlugin on iOS. The same factoryId can be used by both platforms or each can have their own.

Native Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) => print('Ad closed.'),
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
 // Called when a click is recorded for a NativeAd.
 onNativeAdClicked: (NativeAd ad) => print('Ad clicked.'),
 // Called when an impression is recorded for a NativeAd.
 onNativeAdImpression: (NativeAd ad) => print('Ad impression.'),
);

Load Native Ad

After a NativeAd is instantiated, load() must be called before it can be shown on the screen.

myNative.load();

Display a Native Ad

To display a NativeAd as a widget, you must instantiate an AdWidget with a supported ad after calling load(). You can create the widget before calling load(), but load() must be called before adding it to the widget tree.

final AdWidget adWidget = AdWidget(ad: myBanner);

AdWidget inherits from Flutter's Widget class and can be used as any other widget. On iOS, make sure you place the widget in a widget with a specified width and height. Otherwise, your Ad may not be displayed.

final Container adContainer = Container(
  alignment: Alignment.center,
  child: adWidget,
  width: 500,
  height: 500,
);

Once an Ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is either after the AdWidget is removed from the widget tree or in the AdListener.onAdFailedToLoad callback.

That's it! Your app is now ready to display native ads.

Next steps

Ad Manager Rewarded Ads

Rewarded ads are ads that users have the option of interacting with in exchange for in-app rewards. This guide shows you how to integrate rewarded ads from Ad Manager into a Flutter app.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for rewarded:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Rewarded Ad

A RewardedAd requires an adUnitId, an AdRequest, and an AdListener with the onRewardedAdUserEarnedReward callback implemented. An example is shown below as well as more information on each parameter following.

final RewardedAd myRewarded = RewardedAd.fromPublisherRequest(
 adUnitId: '',
 request: PublisherAdRequest(),
 listener: AdListener(
   onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {
     print(reward.type);
     print(reward.amount);
   },
 ),
);

Rewarded Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) {
   ad.dispose();
   print('Ad closed.');
 },
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
 // Called when a RewardedAd triggers a reward.
 onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {
   print('Reward earned: $reward');
 },
);

Key Point: Make sure to implement the onRewardedAdUserEarnedReward event to reward the user for watching an ad.

Load Rewarded Ad

After a RewardedAd is instantiated, load() must be called before it can be shown on the screen.

myRewarded.load();

Display a RewardedAd

A RewardedAd is displayed as an Overlay is displayed on top of all app content and is statically placed. Which means it can not be displayed this way can't be added to the Flutter widget tree. You can choose when to show the add by calling show() after the ad is loaded.

myRewarded.show();

This method should only be called after load() and the AdListener.onAdLoaded method has been triggered. Once show() is called, an Ad displayed this way can't be removed programmatically and require user input. Do not call show() more than once for a loaded RewardedAd. Instead you should load a new ad.

Once an ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is in the AdListener.onAdFailedToLoad and AdListener.onAdClosed and callbacks.

That's it! Your app is now ready to display rewarded ads.

Next Steps

Targeting

The RequestConfiguration object collects the global configuration for every ad request and is applied by MobileAds.instance.updateRequestConfiguration().

Child-directed setting

For purposes of the Children's Online Privacy Protection Act (COPPA), there is a setting called "tag for child-directed treatment."

As an app developer, you can indicate whether you want Google to treat your content as child-directed when you make an ad request. If you indicate that you want Google to treat your content as child-directed, we take steps to disable IBA and remarketing ads on that ad request. The setting can be used with all versions of the Google Play services SDK via RequestConfiguration.tagForChildDirectedTreatment():

  • Use the argument TagForChildDirectedTreatment.yes to indicate that you want your content treated as child-directed for the purposes of COPPA.
  • Use the argument TagForChildDirectedTreatment.no to indicate that you don't want your content treated as child-directed for the purposes of COPPA.
  • Use the argument TagForChildDirectedTreatment.unspecified or do not set this tag if you do not wish to indicate how you would like your content treated with respect to COPPA in ad requests.

The following example indicates that you want your content treated as child-directed for purposes of COPPA:

final RequestConfiguration requestConfiguration = RequestConfiguration(
  tagForChildDirectedTreatment: TagForChildDirectedTreatment.yes);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);

Users under the age of consent

You can mark your ad requests to receive treatment for users in the European Economic Area (EEA) under the age of consent. This feature is designed to help facilitate compliance with the General Data Protection Regulation (GDPR). Note that you may have other legal obligations under GDPR. Please review the European Union’s guidance and consult with your own legal counsel. Please remember that Google's tools are designed to facilitate compliance and do not relieve any particular publisher of its obligations under the law. Learn more about how the GDPR affects publishers.

When using this feature, a Tag For Users under the Age of Consent in Europe (TFUA) parameter will be included in the ad request. This parameter disables personalized advertising, including remarketing, for that specific ad request. It also disables requests to third-party ad vendors, such as ad measurement pixels and third-party ad servers.

The setting can be used via RequestConfiguration.tagForUnderAgeOfConsent():

  • Use the argument TagForUnderAgeOfConsent.yes to indicate that you want the request configuration to be handled in a manner suitable for users under the age of consent.
  • Use the argument TagForUnderAgeOfConsent.no to indicates that you don't want the request configuration to be handled in a manner suitable for users under the age of consent.
  • Use the argument TagForUnderAgeOfConsent.unspecified or do not set this tag to indicate that you have not specified whether the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent. The following example indicates that you want TFUA included in your ad request:
final RequestConfiguration requestConfiguration = RequestConfiguration(
  tagForUnderAgeOfConsent: TagForUnderAgeOfConsent.yes);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);

The tags to enable the Child-directed setting and setTagForUnderAgeOfConsent should not both simultaneously be set to true. If they are, the child-directed setting takes precedence.

Ad Content Filtering

The setting can be set via RequestConfiguration.maxAdContentRating():

AdMob ads returned for these requests have a content rating at or below that level. The possible values for this network extra are based on digital content label classifications, and should be one of the following MaxAdContentRating objects:

  • MaxAdContentRating.g
  • MaxAdContentRating.pg
  • MaxAdContentRating.t
  • MaxAdContentRating.ma

The following code configures a RequestConfiguration object to specify that ad content returned should correspond to a digital content label designation no higher than G:

final RequestConfiguration requestConfiguration = RequestConfiguration(
  maxAdContentRating: MaxAdContentRating.g);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);
Comments
  • Android inline ad performance

    Android inline ad performance

    There have been a number of complaints about performance of inline banner and native ads on Android:

    • https://github.com/googleads/googleads-mobile-flutter/issues/167
    • https://github.com/googleads/googleads-mobile-flutter/issues/75
    • https://github.com/googleads/googleads-mobile-flutter/issues/80
    • https://github.com/googleads/googleads-mobile-flutter/issues/231
    • https://github.com/googleads/googleads-mobile-flutter/issues/239

    As mentioned in https://github.com/googleads/googleads-mobile-flutter/issues/80#issuecomment-803621668, performance is noticeably worse on Android 9 and below. This is related to use of hybrid composition, which is a requirement due to technical constraints.

    Currentworkarounds are to constrict inline ads to android 10 and above, or only to only use fixed position banner/native ads.

    bug fixed performance p2-medium e3-weeks platform-android 
    opened by jjliu15 106
  • 🐛 [Android] Release Mode Error:  Ad failed to load: LoadAdError(code: 3, domain: com.google.android.gms.ads, message: No ad config.)

    🐛 [Android] Release Mode Error: Ad failed to load: LoadAdError(code: 3, domain: com.google.android.gms.ads, message: No ad config.)

    Bug report

    Describe the bug With flutter_admob I am able to show Interstitial ad with my app id, but when I migrated to googleads-mobile-flutter, my ad is not displayed and gives me this error:

    Ad failed to load: LoadAdError(code: 3, domain: com.google.android.gms.ads, message: No ad config.)

    Same thing applies to banner ads, too.

    Steps to reproduce

    Steps to reproduce the behavior:

    1. Use a real ad id with googleads-mobile-flutter for banner or interstitial (these are the ones that I tested)
    2. Use AdListener to log callbacks.
    3. flutter run --release and see the error.

    Expected behavior

    Ads should be displayed.


    Flutter doctor

    Run flutter doctor and paste the output below:

    Click To Expand
    PASTE OUTPUT INSIDE HERE
    

    Flutter dependencies

    Run flutter pub deps -- --style=compact and paste the output below:

    Click To Expand
    PASTE OUTPUT INSIDE HERE
    

    bug wont fix - intended behavior platform-android admob 
    opened by figengungor 55
  • google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved to 0.0.1, which depends on Google-Mobile-Ads-SDK (= 8.13.0) was resolved to 8.13.0, which depends on GoogleAppMeasurement (< 9.0, >= 7.0)

    google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved to 0.0.1, which depends on Google-Mobile-Ads-SDK (= 8.13.0) was resolved to 8.13.0, which depends on GoogleAppMeasurement (< 9.0, >= 7.0)

    Plugin Version

    google_mobile_ads: ^1.3.0

    Steps to Reproduce

    pubspec.yaml

      firebase_core: ^1.19.1
      firebase_analytics: ^9.1.10
      cloud_firestore: ^3.2.1
      firebase_auth: ^3.4.1
      firebase_storage: ^10.3.1
      cloud_functions: ^3.3.1
      firebase_messaging: ^11.4.4
      firebase_crashlytics: ^2.8.4
      firebase_dynamic_links: ^4.3.1
    
      google_mobile_ads: ^1.3.0
    
    1. Run pod install.

    Expected results: Non error.

    Actual results: Error occurred.

    [!] CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
      In Podfile:
        firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 9.1.12, which depends on
          Firebase/Analytics (= 9.2.0) was resolved to 9.2.0, which depends on
            Firebase/Core (= 9.2.0) was resolved to 9.2.0, which depends on
              FirebaseAnalytics (~> 9.2.0) was resolved to 9.2.0, which depends on
                FirebaseAnalytics/AdIdSupport (= 9.2.0) was resolved to 9.2.0, which depends on
                  GoogleAppMeasurement (= 9.2.0)
    
        google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved to 0.0.1, which depends on
          Google-Mobile-Ads-SDK (= 8.13.0) was resolved to 8.13.0, which depends on
            GoogleAppMeasurement (< 9.0, >= 7.0)
    
    
    Logs
    bug p1-high e1-hours platform-ios 
    opened by hukusuke1007 40
  • 🐛 Low performance when using AdWidget

    🐛 Low performance when using AdWidget

    Bug report

    After adding AdWidget to widget tree overall app performance is low.

    Steps to reproduce

    Steps to reproduce the behavior:

    I've building BannerAd and AdWidget in follow way:

    
      BannerAd getBannerAd() {
        BannerAd bannerAd = BannerAd(
          size: AdSize.fullBanner,
          adUnitId: Config.adMobBannerIdTest,
          listener: AdListener(
            onAdFailedToLoad: (ad, error) {
              ad.dispose();
            },
          ),
          request: AdRequest(
              nonPersonalizedAds: _sharedPrefs.isPersonalizedAds() == false,),
        );
        bannerAd.load();
        return bannerAd;
      }
    
      Widget buildAdWidget(BannerAd? bannerAd){
        if(bannerAd != null){
          AdWidget adWidget = AdWidget(ad: bannerAd);
          return Container(
            alignment: Alignment.center,
            child: adWidget,
            width: bannerAd.size.width.toDouble(),
            height: bannerAd.size.height.toDouble(),
          );
        }else
          return SizedBox();
      }
    

    Then in when I add AdWidget to screen performance is low. I've added simple check to determine if its fault of AdWidget and it seems its the problem:

        Widget adContainer = false ? SizedBox() : _adMobHelper!.buildAdWidget(bannerAd);
        return Scaffold(
          body: Column(
            children: [
              Expanded(
                child: IndexedStack(
                  index: _currentIndex,
                  children: _children,
                ),
              ),
              adContainer
    
            ],
          ),
    ...rest of code, rather not important
    

    Expected behavior

    None to low impact on performance


    Additional context

    While I was using firebase_admob everything worked smooth


    Flutter doctor

    Run flutter doctor and paste the output below:

    Click To Expand
    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel beta, 2.0.1, on Microsoft Windows [Version 10.0.18363.1440], locale en-US)
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    [√] Chrome - develop for the web
    [√] Android Studio (version 4.1.0)
    [√] Connected device (3 available)
    
    • No issues found!
    
    

    Flutter dependencies

    Run flutter pub deps -- --style=compact and paste the output below:

    Click To Expand
    Dart SDK 2.12.0
    Flutter SDK 2.0.1
    bmi_calculator 1.0.2+5
    
    dependencies:
    - android_alarm_manager 0.4.5+20 [flutter]
    - catex 0.0.1+6 [flutter meta]
    - clip_shadow 0.2.1 [flutter]
    - cupertino_icons 1.0.2
    - devicelocale 0.3.3 [flutter]
    - firebase_analytics 7.1.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta]
    - firebase_core 1.0.1 [firebase_core_platform_interface firebase_core_web flutter meta]
    - firebase_crashlytics 1.0.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
    - firebase_remote_config 0.9.0-dev.0 [flutter firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface]
    - fl_chart 0.20.1 [flutter path_drawing equatable pedantic]
    - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
    - flutter_html 2.0.0-nullsafety.0 [html csslib css_colors flutter_layout_grid video_player chewie webview_flutter chewie_audio flutter_svg flutter]
    - flutter_local_notifications 5.0.0-nullsafety.1 [flutter flutter_local_notifications_platform_interface platform timezone]
    - flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math]
    - flutter_settings_screens 0.2.1+1 [flutter flutter_material_color_picker path_provider provider shared_preferences]
    - flutter_speed_dial 1.2.5 [flutter]
    - fluttertoast 3.1.3 [flutter]
    - freezed 0.12.7 [analyzer build build_config meta source_gen freezed_annotation]
    - google_fonts 1.1.2 [flutter http path_provider crypto]
    - google_mobile_ads 0.11.0+3 [meta flutter]
    - google_sign_in 5.0.0 [google_sign_in_platform_interface google_sign_in_web flutter meta]
    - googleapis 0.56.1 [_discoveryapis_commons http]
    - in_app_purchase 0.5.1 [flutter json_annotation meta collection]
    - intl 0.17.0 [clock path]
    - json_annotation 4.0.0
    - mockito 4.1.4 [analyzer build code_builder collection dart_style matcher meta source_gen test_api]
    - package_info 0.4.3+2 [flutter]
    - path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
    - provider 5.0.0 [collection flutter nested]
    - rate_my_app 1.0.0+2 [shared_preferences pedantic flutter]
    - rxdart 0.22.2
    - sembast 2.1.0 [meta path synchronized]
    - shared_preferences 2.0.4 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]
    - simple_tooltip 0.1.14 [flutter]
    - url_launcher 6.0.2 [flutter url_launcher_platform_interface url_launcher_linux url_launcher_macos url_launcher_windows url_launcher_web]
    - workmanager 0.2.3 [flutter]
    
    dev dependencies:
    - build_runner 1.11.0 [args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspe
    c_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
    - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
    - json_serializable 4.0.2 [analyzer build build_config json_annotation meta path source_gen]
    
    transitive dependencies:
    - _discoveryapis_commons 0.2.0 [http]
    - _fe_analyzer_shared 14.0.0 [meta]
    - analyzer 0.41.2 [_fe_analyzer_shared args cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
    - args 1.6.0
    - async 2.5.0 [collection]
    - boolean_selector 2.1.0 [source_span string_scanner]
    - build 1.6.2 [analyzer async convert crypto glob logging meta path]
    - build_config 0.4.5 [checked_yaml json_annotation meta path pubspec_parse yaml]
    - build_daemon 2.1.9 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
    - build_resolvers 1.5.3 [analyzer build crypto graphs logging meta path package_config pool pub_semver]
    - build_runner_core 6.1.7 [async build build_config build_resolvers collection convert crypto glob graphs logging meta path package_config pedantic pool timing watcher yaml]
    - built_collection 5.0.0
    - built_value 8.0.2 [built_collection collection fixnum]
    - characters 1.1.0
    - charcode 1.2.0
    - checked_yaml 1.0.4 [json_annotation source_span yaml]
    - chewie 1.0.0 [cupertino_icons flutter video_player wakelock]
    - chewie_audio 1.2.0 [cupertino_icons flutter video_player]
    - cli_util 0.2.0 [path]
    - clock 1.1.0
    - code_builder 3.7.0 [built_collection built_value collection matcher meta]
    - collection 1.15.0
    - convert 2.1.1 [charcode typed_data]
    - crypto 2.1.5 [collection convert typed_data]
    - css_colors 1.1.0 [flutter]
    - csslib 0.17.0 [source_span]
    - dart_style 1.3.10 [analyzer args path source_span]
    - equatable 2.0.0 [collection meta]
    - fake_async 1.2.0 [clock collection]
    - ffi 1.0.0
    - file 6.1.0 [meta path]
    - firebase 7.3.3 [http http_parser js]
    - firebase_analytics_platform_interface 1.1.0 [flutter meta]
    - firebase_analytics_web 0.2.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
    - firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface]
    - firebase_core_web 1.0.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
    - firebase_crashlytics_platform_interface 2.0.0 [collection firebase_core flutter meta plugin_platform_interface]
    - firebase_remote_config_platform_interface 0.2.0-dev.0 [flutter meta firebase_core plugin_platform_interface]
    - fixnum 1.0.0
    - flutter_layout_grid 1.0.0-nullsafety.6 [flutter collection meta quiver]
    - flutter_local_notifications_platform_interface 3.0.0-nullsafety.4 [flutter plugin_platform_interface]
    - flutter_material_color_picker 1.0.5 [flutter]
    - flutter_svg 0.21.0-nullsafety.0 [flutter meta path_drawing vector_math xml]
    - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
    - freezed_annotation 0.14.0 [collection json_annotation meta]
    - glob 1.2.0 [async collection node_io path pedantic string_scanner]
    - google_sign_in_platform_interface 2.0.1 [flutter meta quiver]
    - google_sign_in_web 0.10.0 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
    - graphs 0.2.0
    - html 0.15.0 [csslib source_span]
    - http 0.12.2 [http_parser path pedantic]
    - http_multi_server 2.2.0 [async]
    - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
    - io 0.3.4 [charcode meta path string_scanner]
    - js 0.6.3
    - logging 0.11.4
    - matcher 0.12.10 [stack_trace]
    - meta 1.3.0
    - mime 0.9.7
    - nested 1.0.0 [flutter]
    - node_interop 1.1.1 [js]
    - node_io 1.1.1 [node_interop path]
    - package_config 1.9.3 [path charcode]
    - path 1.8.0
    - path_drawing 0.5.0-nullsafety.0 [vector_math meta path_parsing flutter]
    - path_parsing 0.2.0-nullsafety.0 [vector_math meta]
    - path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter]
    - path_provider_macos 2.0.0 [flutter]
    - path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface]
    - path_provider_windows 2.0.0 [path_provider_platform_interface meta path flutter ffi win32]
    - pedantic 1.11.0
    - petitparser 4.0.2 [meta]
    - platform 3.0.0
    - plugin_platform_interface 2.0.0 [meta]
    - pool 1.4.0 [async stack_trace]
    - process 4.1.0 [file path platform]
    - pub_semver 1.4.4 [collection]
    - pubspec_parse 0.1.8 [checked_yaml json_annotation pub_semver yaml]
    - quiver 3.0.0 [matcher]
    - shared_preferences_linux 2.0.0 [flutter file meta path path_provider_linux shared_preferences_platform_interface]
    - shared_preferences_macos 2.0.0 [shared_preferences_platform_interface flutter]
    - shared_preferences_platform_interface 2.0.0 [flutter]
    - shared_preferences_web 2.0.0 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
    - shared_preferences_windows 2.0.0 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows]
    - shelf 0.7.9 [async collection http_parser path stack_trace stream_channel]
    - shelf_web_socket 0.2.3 [shelf web_socket_channel stream_channel]
    - sky_engine 0.0.99
    - source_gen 0.9.10+3 [analyzer async build dart_style glob meta path pedantic source_span]
    - source_span 1.8.0 [charcode collection path term_glyph]
    - stack_trace 1.10.0 [path]
    - stream_channel 2.1.0 [async]
    - stream_transform 1.2.0
    - string_scanner 1.1.0 [charcode source_span]
    - synchronized 2.2.0+2
    - term_glyph 1.2.0
    - test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
    - timezone 0.7.0-nullsafety.0 [path]
    - timing 0.1.1+3 [json_annotation]
    - typed_data 1.3.0 [collection]
    - url_launcher_linux 2.0.0 [flutter]
    - url_launcher_macos 2.0.0 [flutter]
    - url_launcher_platform_interface 2.0.2 [flutter plugin_platform_interface]
    - url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins]
    - url_launcher_windows 2.0.0 [flutter]
    - vector_math 2.1.0
    - video_player 2.0.2 [meta video_player_platform_interface video_player_web flutter flutter_test]
    - video_player_platform_interface 4.0.0 [flutter meta flutter_test]
    - video_player_web 2.0.0 [flutter flutter_web_plugins meta video_player_platform_interface]
    - wakelock 0.4.0 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web]
    - wakelock_macos 0.1.0 [flutter flutter_web_plugins wakelock_platform_interface]
    - wakelock_platform_interface 0.2.0 [flutter meta]
    - wakelock_web 0.2.0 [flutter flutter_web_plugins js wakelock_platform_interface]
    - watcher 0.9.7+15 [async path pedantic]
    - web_socket_channel 1.1.0 [async crypto stream_channel]
    - webview_flutter 2.0.2 [flutter]
    - win32 2.0.0 [ffi]
    - xdg_directories 0.2.0 [meta path process]
    - xml 5.0.2 [collection meta petitparser]
    - yaml 2.2.1 [charcode collection string_scanner source_span]
    

    duplicate 
    opened by kuba91 39
  • All apps using googleads-mobile-flutter getting blocked for

    All apps using googleads-mobile-flutter getting blocked for "Ad Fraud"

    I have 12 apps,

    6 of flutter and 6 native.

    all 6 of flutter getting blocked for ad fraud by AdMob, and all other native everything totally fine. I'm doing the same in all apps, one interstitial ad on splash and that's it.

    Maybe somehow it's the library? I can't find any reasonable solution for this issue

    opened by dvird 36
  • Google Ads don't work on iOS

    Google Ads don't work on iOS

    Hi friends,

    My Flutter Doctor:

    [√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.795], locale en-GB)
        • Flutter version 3.0.5 at C:\Users\burac\Documents\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16 -0700
        • Engine revision e85ea0e79c
        • Dart version 2.17.6
        • DevTools version 2.12.2
    
    [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
        • Android SDK at C:\Users\burac\AppData\Local\Android\sdk
        • Platform android-33, build-tools 33.0.0
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
        • All Android licenses accepted.
        • VS Code at C:\Users\burac\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.46.0
    
    [√] Connected device (4 available)
        • SM A908B (mobile) • RFCMA02W5WT • android-arm64  • Android 12 (API 31)
        • Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Version 10.0.22000.795]
        • Chrome (web)      • chrome      • web-javascript • Google Chrome 104.0.5112.79
        • Edge (web)        • edge        • web-javascript • Microsoft Edge 103.0.1264.77
    
    [√] HTTP Host Availability
        • All required HTTP hosts are available
    
    • No issues found!
    
    

    My Test ads are displayed correctly on Android but no more on iOS, I get this error, please help me:

    o get test ads on this device, set: Objective-C        GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @"6490ca18f82177ab9c0739867ab4ae5d" ];Swift        
    GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ @"6490ca18f82177ab9c0739867ab4ae5d" ]
    <Google> Note that test device identifiers may be reset when uninstalling and reinstalling the application.<Google> 
    <Google:HTML> A valid SKAdNetworkIdentifier for Google (cstr6suwn9.skadnetwork) is missing from Info.plist. 
    See [Enable SKAdNetwork to track conversions] (https://googlemobileadssdk.page.link/enable-skadnetwork)flutter: Inline adaptive banner failedToLoad: LoadAdError(code: 1, domain: com.google.admob, message: 
    Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))flutter: Inline adaptive banner failedToLoad: 
    LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))
    

    Any ideas why, thanks!

    solved 
    opened by RoyalCoder88 34
  • Low performance with Flutter 3 on iOS devices

    Low performance with Flutter 3 on iOS devices

    I found performance issues with Flutter 3.0.1, with Dart 2.17.1, using the google_mobile_ads 1.2.0 on iOS.

    Obs.: Using LARGE_BANNER ad. I think this is realted to google_mobile_ads and iOS. Android works pretty well, without any issues.

    Evidence video

    https://user-images.githubusercontent.com/18273071/170879694-b6874cce-69c7-41bc-807b-88b1335783a8.mp4

    Plugin Version

    google_mobile_ads: ˆ1.2.0

    Steps to Reproduce

    1. Create some example app using flutter 3.0.1
    2. Add google_mobile_ads version 1.2.0 and use Banner Ad on different pages of your app.
    3. Navigate between pages with real banners ids - on TEST MODE (simulates real ads)

    Expected results: Fluid navigation

    Actual results: Performance issues

    flutter doctor -v
    [✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-x64, locale pt-BR)
        • Flutter version 3.0.1 at /Users/cello/fvm/versions/3.0.1
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision fb57da5f94 (6 days ago), 2022-05-19 15:50:29 -0700
        • Engine revision caaafc5604
        • Dart version 2.17.1
        • DevTools version 2.12.2
    
    [!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /Users/cello/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0
        • ANDROID_HOME = /Users/cello/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
        ✗ Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 13.4)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2021.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    
    [✓] Connected device (2 available)
        • macOS (desktop) • macos  • darwin-x64     • macOS 12.4 21F79 darwin-x64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 101.0.4951.64
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    bug performance p1-high platform-ios banner ad 
    opened by marcellocamara 34
  • Displaying an AdWidget with another Platform view like GoogleMap or WebView freeze those views.

    Displaying an AdWidget with another Platform view like GoogleMap or WebView freeze those views.

    Bug report

    (Android only. iOS seems fine) I've got a screen containing a Platform view widget (Google Maps and/or WebView) As soon as the Adwidget is displayed (=once the load method is called), the others platform views freeze = i can not interact/scroll inside them anymore.

    Steps to reproduce

    Steps to reproduce the behavior:

    Use those packages: google_maps_flutter: ^1.2.0 google_mobile_ads: ^0.11.0+1 webview_flutter: ^1.0.7

    Use this code :

    import 'package:google_mobile_ads/google_mobile_ads.dart';
    import 'package:google_maps_flutter/google_maps_flutter.dart';
    import 'package:webview_flutter/webview_flutter.dart';
    
    import 'ad_state.dart';
    
    class AdPage extends StatefulWidget {
      AdPage({Key key}) : super(key: key);
    
      @override
      _AdPageState createState() => _AdPageState();
    }
    
    class _AdPageState extends State<AdPage> {
      BannerAd banner;
      bool isLoading = false;
    
      @override
      void initState() {
        super.initState();
        
        banner = BannerAd(
          adUnitId: BannerAd.testAdUnitId,
          size: AdSize.banner,
          request: AdRequest(),
          listener: AdState.adListener,
        ); //..load();
        
        Future<void>.delayed(
            Duration(seconds: 15),
            () => setState(() {
                  banner?.load();
                  isLoading = true;
                }));
      }
    
      @override
      Widget build(BuildContext context) {
        return Column(
          children: [
            Container(
              height: 300,
              child: WebView(
                javascriptMode: JavascriptMode.unrestricted,
                initialUrl: "https://www.flutter.dev",
              ),
            ),
            Container(
              height: 300,
              child: GoogleMap(
                  initialCameraPosition:
                      CameraPosition(target: LatLng(46.0, -0.36), zoom: 15.0)),
            ),
            Container(
              height: 50,
              child: isLoading ? AdWidget(ad: banner) : null,
            ),
          ],
        );
      }
    }
    

    Flutter doctor

    Run flutter doctor and paste the output below:

    Click To Expand
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H15 darwin-x64, locale fr-FR)
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    [✓] Xcode - develop for iOS and macOS (Xcode 12.4)
    [!] Android Studio (version 4.1)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [!] VS Code (version 1.53.1)
        ✗ Flutter extension not installed; install from
          https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    [✓] Connected device (1 available)
    
    ! Doctor found issues in 2 categories.
    

    Flutter dependencies

    Run flutter pub deps -- --style=compact and paste the output below:

    Click To Expand
    Dart SDK 2.10.5
    Flutter SDK 1.22.6
    google_mobile_ads_bug 1.0.0+1
    
    dependencies:
    - cupertino_icons 1.0.0
    - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
    - google_maps_flutter 1.2.0 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface]
    - google_mobile_ads 0.11.0+1 [meta flutter]
    - provider 4.3.3 [collection flutter nested]
    - webview_flutter 1.0.7 [flutter]
    
    dev dependencies:
    - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
    
    transitive dependencies:
    - async 2.5.0-nullsafety.1 [collection]
    - boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
    - characters 1.1.0-nullsafety.3
    - charcode 1.2.0-nullsafety.1
    - clock 1.1.0-nullsafety.1
    - collection 1.15.0-nullsafety.3
    - fake_async 1.2.0-nullsafety.1 [clock collection]
    - flutter_plugin_android_lifecycle 1.0.11 [flutter]
    - google_maps_flutter_platform_interface 1.2.0 [flutter meta plugin_platform_interface stream_transform collection]
    - matcher 0.12.10-nullsafety.1 [stack_trace]
    - meta 1.3.0-nullsafety.3
    - nested 0.0.4 [flutter]
    - path 1.8.0-nullsafety.1
    - plugin_platform_interface 1.0.3 [meta]
    - sky_engine 0.0.99
    - source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph]
    - stack_trace 1.10.0-nullsafety.1 [path]
    - stream_channel 2.1.0-nullsafety.1 [async]
    - stream_transform 1.2.0
    - string_scanner 1.1.0-nullsafety.1 [charcode source_span]
    - term_glyph 1.2.0-nullsafety.1
    - test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
    - typed_data 1.3.0-nullsafety.3 [collection]
    - vector_math 2.1.0-nullsafety.3
    

    bug p2-medium e3-weeks platform-android 
    opened by sperochon 29
  • WriteBuffer buffer error

    WriteBuffer buffer error

    Plugin Version

    Steps to Reproduce

    1. Run flutter create bug.
    2. Update the files as follows: ...
    3. ...

    Expected results:

    Actual results:

    Logs
    invalid 
    opened by Manishmg3994 28
  • [Android] Ads flickering when navigating or scroll

    [Android] Ads flickering when navigating or scroll

    Plugin Version

    1.0.1

    Details

    Target Platform: Android Target OS version: Android 11 Devices: Galaxy S21

    I'm displaying BannerAd in my app in home screen and in "product details screen" both placed inside 'Scaffold' -> 'bottomNavigationBar'. When pushing the "product details screen" screen the animation goes as should be, but when navigating back to home screen there is a flickering in the navigation.

    My custom class for displaying the BannerAd widget in the above screens.

    custom_banner.dart

    import 'package:flutter/material.dart';
    import 'package:google_mobile_ads/google_mobile_ads.dart';
    import 'package:net_reven/app/config.dart';
    
    class CustomBannerAd extends StatefulWidget {
      const CustomBannerAd({Key key}) : super(key: key);
    
      @override
      _CustomBannerAdState createState() => _CustomBannerAdState();
    }
    
    class _CustomBannerAdState extends State<CustomBannerAd> {
      BannerAd _anchoredAdaptiveAd;
      var _isLoaded = false;
      Orientation _currentOrientation;
    
      @override
      void didChangeDependencies() {
        super.didChangeDependencies();
    
        _currentOrientation = MediaQuery.of(context).orientation;
        _loadAd();
      }
    
      @override
      void dispose() {
        super.dispose();
    
        _anchoredAdaptiveAd?.dispose();
      }
    
      Future<void> _loadAd() async {
        await _anchoredAdaptiveAd?.dispose();
    
        if (mounted) {
          setState(() {
            _anchoredAdaptiveAd = null;
            _isLoaded = false;
          });
        }
    
        final AnchoredAdaptiveBannerAdSize size =
            await AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(
                MediaQuery.of(context).size.width.truncate());
    
        if (size == null) {
          debugPrint('Unable to get height of anchored banner.');
          return;
        }
    
        _anchoredAdaptiveAd = BannerAd(
          adUnitId: Config.adUnitId,
          size: size,
          request: const AdRequest(
            nonPersonalizedAds: false,
          ),
          listener: BannerAdListener(
            onAdLoaded: (Ad ad) {
              debugPrint("Ad loaded");
              if (mounted) {
                setState(() {
                  _anchoredAdaptiveAd = ad as BannerAd;
                  _isLoaded = true;
                });
              }
            },
            onAdFailedToLoad: (Ad ad, LoadAdError error) {
              debugPrint('$BannerAd failedToLoad: $error');
              ad.dispose();
            },
            onAdOpened: (Ad ad) => debugPrint('$BannerAd onAdOpened.'),
            onAdClosed: (Ad ad) => debugPrint('$BannerAd onAdClosed.'),
          ),
        );
    
        return _anchoredAdaptiveAd.load();
      }
    
      @override
      Widget build(BuildContext context) {
        return OrientationBuilder(builder: (context, orientation) {
          if (_currentOrientation == orientation &&
              _anchoredAdaptiveAd != null &&
              _isLoaded) {
            return Container(
              color: Colors.transparent,
              width: _anchoredAdaptiveAd.size.width.toDouble(),
              height: _anchoredAdaptiveAd.size.height.toDouble(),
              child: AdWidget(ad: _anchoredAdaptiveAd),
            );
          }
    
          // Reload the ad if the orientation changes.
          if (_currentOrientation != orientation) {
            _currentOrientation = orientation;
            _loadAd();
          }
          return const SizedBox.shrink();
        });
      }
    }
    

    flutter doctor -v

    [✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale
        en-IL)
        • Flutter version 2.5.3 at /Users/eitanaflalo/development/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 18116933e7 (8 weeks ago), 2021-10-15 10:46:35 -0700
        • Engine revision d3ea636dc5
        • Dart version 2.14.4
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /Users/eitanaflalo/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 13.1, Build version 13A1030d
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    
    [✓] VS Code (version 1.62.3)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension can be installed from:
          🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    
    [✓] Connected device (3 available)
        • SM J710F (mobile) • 52036ac7f0d6a359 • android-arm    • Android 8.1.0 (API
          27)
        • macOS (desktop)   • macos            • darwin-x64     • macOS 12.0.1
          21A559 darwin-x64
        • Chrome (web)      • chrome           • web-javascript • Google Chrome
          96.0.4664.93
    
    • No issues found!
    
    bug fixed performance p2-medium e3-weeks platform-android banner ad 
    opened by CripyIce 25
  • 🐛 [Banner Ad] 'Fatal Exception: NSInvalidArgumentException' in iOS

    🐛 [Banner Ad] 'Fatal Exception: NSInvalidArgumentException' in iOS

    Bug report

    Describe the bug The iOS (Swift) app crashes randomly, but often, when banners are loaded with the error:

    Fatal Exception: NSInvalidArgumentException
    *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
    

    Stack Trace

    Fatal Exception: NSInvalidArgumentException
    0  CoreFoundation                 0x1a4b33180 __exceptionPreprocess
    1  libobjc.A.dylib                0x1a3d0b9f8 objc_exception_throw
    2  CoreFoundation                 0x1a4aacbec _CFArgv
    3  CoreFoundation                 0x1a4a34898 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
    4  CoreFoundation                 0x1a4a25474 +[NSDictionary dictionaryWithObjects:forKeys:count:]
    5  Runner                         0x1012cff2c -[FLTAdInstanceManager onAdLoaded:] + 82 (FLTAdInstanceManager_Internal.m:82)
    6  Runner                         0x1012ce174 -[FLTBannerAd adViewDidReceiveAd:] + 150 (FLTAd_Internal.m:150)
    7  Runner                         0x1011d4824 GAD_GADBannerView_arm64_7_69_0
    8  Runner                         0x10122a058 __copy_helper_block_e8_32s40s48s56s64b72w
    9  Runner                         0x10122a114 __copy_helper_block_e8_32s40s48s56s64b72w
    10 Runner                         0x101229d08 GAD_GADInternalBannerView_arm64_7_69_0
    11 Runner                         0x1012298d0 GAD_GADInternalBannerView_arm64_7_69_0
    12 Runner                         0x101229f80 GAD_GADInternalBannerView_arm64_7_69_0
    13 libdispatch.dylib              0x1a4570a38 _dispatch_call_block_and_release
    14 libdispatch.dylib              0x1a45717d4 _dispatch_client_callout
    15 libdispatch.dylib              0x1a451f008 _dispatch_main_queue_callback_4CF$VARIANT$mp
    16 CoreFoundation                 0x1a4ac4b20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
    17 CoreFoundation                 0x1a4abfa58 __CFRunLoopRun
    18 CoreFoundation                 0x1a4abefb4 CFRunLoopRunSpecific
    19 GraphicsServices               0x1a6cc079c GSEventRunModal
    20 UIKitCore                      0x1d1320c38 UIApplicationMain
    21 Runner                         0x100fb37d8 main + 6 (AppDelegate.swift:6)
    22 libdyld.dylib                  0x1a45828e0 start
    

    Steps to reproduce

    Steps to reproduce the behavior:

    1. Create a Flutter project (Swift).
    2. Insert an inline banner as described in the codelabs (in a ListView).
    3. The error will appear randomly.

    Expected behavior

    The app should not crash.


    Additional context

    I have not been able to reproduce the error continuously but many of my users have encountered it as I can see from the crashlytics logs.

    I have mediation with MoPub, Facebook Audience Network and AdColony configured but the error also occurs if I pause it.


    Flutter doctor

    Run flutter doctor and paste the output below:

    Click To Expand
    [✓] Flutter (Channel stable, 2.0.3, on Mac OS X 10.15.7 19H2 darwin-x64, locale it-IT)
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    [✓] Xcode - develop for iOS and macOS
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 4.1)
    [✓] VS Code (version 1.54.3)
    [✓] Connected device (3 available)
    
    • No issues found!
    

    Flutter dependencies

    Run flutter pub deps -- --style=compact and paste the output below:

    Click To Expand
    Dart SDK 2.12.2
    Flutter SDK 2.0.3
    
    dependencies:
    - admob_consent 1.1.2 [flutter]
    - apple_sign_in 0.1.0 [flutter]
    - async 2.5.0 [collection]
    - auto_size_text 2.1.0 [flutter]
    - cached_network_image 3.0.0-nullsafety [flutter flutter_cache_manager octo_image]
    - camera 0.8.0 [flutter camera_platform_interface pedantic quiver]
    - carousel_slider 3.0.0 [flutter]
    - circular_check_box 1.0.4 [flutter]
    - cloud_firestore 1.0.2 [cloud_firestore_platform_interface cloud_firestore_web firebase_core firebase_core_platform_interface flutter meta]
    - connectivity_widget 0.1.7 [flutter rxdart connectivity stream_disposable http]
    - cupertino_icons 1.0.2
    - dio 4.0.0-prev3 [http_parser path]
    - easy_debounce 1.0.2 [flutter]
    - equatable 2.0.0 [collection meta]
    - expandable 5.0.1 [flutter]
    - extended_image 3.0.0 [extended_image_library flutter meta]
    - firebase_analytics 7.1.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta]
    - firebase_auth 1.0.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
    - firebase_core 1.0.2 [firebase_core_platform_interface firebase_core_web flutter meta]
    - firebase_crashlytics 1.0.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
    - firebase_messaging 9.0.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
    - firebase_storage 8.0.0 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter]
    - flag 5.0.0-nullsafety [flutter flutter_svg]
    - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
    - flutter_facebook_auth 3.1.1 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web]
    - flutter_image_compress 0.7.0 [flutter]
    - flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math]
    - flutter_rating_bar 4.0.0 [flutter]
    - flutter_signin_button 2.0.0-nullsafety.0 [flutter font_awesome_flutter]
    - font_awesome_flutter 9.0.0 [flutter]
    - get 3.26.0 [flutter]
    - google_fonts 2.0.0 [flutter http path_provider crypto]
    - google_mobile_ads 0.11.0+4 [meta flutter]
    - google_sign_in 5.0.1 [google_sign_in_platform_interface google_sign_in_web flutter meta]
    - http 0.13.1 [http_parser meta path pedantic]
    - image 3.0.2 [archive meta xml]
    - image_editor 1.0.0 [flutter]
    - image_gallery_saver 1.6.8 [flutter]
    - image_picker 0.7.3 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface image_picker_for_web]
    - in_app_review 2.0.1 [flutter in_app_review_platform_interface]
    - intl 0.17.0 [clock path]
    - intl_utils 2.1.0 [analyzer archive args http intl path petitparser yaml]
    - introduction_screen 2.0.0 [flutter dots_indicator]
    - isolate 2.0.3
    - lottie 1.0.1 [archive characters charcode collection flutter logging meta path vector_math]
    - matrix4_transform 2.0.0 [flutter]
    - modal_bottom_sheet 2.0.0 [flutter]
    - native_shared_preferences 1.0.5 [flutter meta]
    - ndialog 4.0.1 [flutter]
    - ntp 1.0.8 [universal_io]
    - package_info 2.0.0 [flutter]
    - page_view_indicators 2.0.0 [flutter]
    - path_drawing 0.5.0-nullsafety.0 [vector_math meta path_parsing flutter]
    - path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
    - permission_handler 6.1.1 [flutter meta permission_handler_platform_interface]
    - photo_view 0.11.1 [flutter]
    - provider 5.0.0 [collection flutter nested]
    - purchases_flutter 3.1.0 [flutter collection]
    - rxdart 0.26.0
    - screenshot 0.3.0 [flutter]
    - share_plus 2.0.0 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web]
    - shared_preferences 2.0.5 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]
    - svg_path_parser 1.0.0 [string_scanner flutter]
    - syncfusion_flutter_charts 18.4.49 [flutter intl vector_math syncfusion_flutter_core]
    - timeago 3.0.2
    - trotter 1.2.0
    - url_launcher 6.0.2 [flutter url_launcher_platform_interface url_launcher_linux url_launcher_macos url_launcher_windows url_launcher_web]
    - video_player 2.0.2 [meta video_player_platform_interface video_player_web flutter flutter_test]
    
    transitive dependencies:
    - _fe_analyzer_shared 19.0.0 [meta]
    - analyzer 1.3.0 [_fe_analyzer_shared cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml pedantic]
    - archive 3.1.2 [crypto path]
    - args 2.0.0
    - boolean_selector 2.1.0 [source_span string_scanner]
    - camera_platform_interface 2.0.1 [flutter meta plugin_platform_interface cross_file stream_transform]
    - characters 1.1.0
    - charcode 1.2.0
    - cli_util 0.3.0 [meta path]
    - clock 1.1.0
    - cloud_firestore_platform_interface 4.0.0 [collection firebase_core flutter meta plugin_platform_interface]
    - cloud_firestore_web 1.0.2 [cloud_firestore_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
    - collection 1.15.0
    - connectivity 3.0.3 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web]
    - connectivity_for_web 0.4.0 [connectivity_platform_interface flutter_web_plugins flutter]
    - connectivity_macos 0.2.0 [flutter]
    - connectivity_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
    - convert 3.0.0 [typed_data]
    - cross_file 0.3.1+1 [flutter meta]
    - crypto 3.0.0 [collection typed_data]
    - dots_indicator 2.0.0 [flutter]
    - extended_image_library 2.0.2 [crypto flutter http_client_helper path path_provider]
    - fake_async 1.2.0 [clock collection]
    - ffi 1.0.0
    - file 6.1.0 [meta path]
    - firebase 9.0.1 [http http_parser js]
    - firebase_analytics_platform_interface 1.1.0 [flutter meta]
    - firebase_analytics_web 0.2.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
    - firebase_auth_platform_interface 4.0.0 [firebase_core flutter meta plugin_platform_interface]
    - firebase_auth_web 1.0.3 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
    - firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface]
    - firebase_core_web 1.0.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
    - firebase_crashlytics_platform_interface 2.0.0 [collection firebase_core flutter meta plugin_platform_interface]
    - firebase_messaging_platform_interface 2.0.1 [firebase_core flutter meta plugin_platform_interface]
    - firebase_messaging_web 1.0.2 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
    - firebase_storage_platform_interface 2.0.0 [collection firebase_core flutter meta plugin_platform_interface]
    - firebase_storage_web 1.0.2 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta]
    - flutter_blurhash 0.5.4-nullsafety.0 [flutter meta pedantic]
    - flutter_cache_manager 3.0.0-nullsafety.2 [clock collection file flutter http image path path_provider pedantic rxdart sqflite uuid]
    - flutter_facebook_auth_platform_interface 2.1.1 [flutter plugin_platform_interface]
    - flutter_facebook_auth_web 2.1.1 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface]
    - flutter_plugin_android_lifecycle 2.0.0 [flutter]
    - flutter_svg 0.21.0-nullsafety.0 [flutter meta path_drawing vector_math xml]
    - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
    - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
    - glob 2.0.0 [async collection file path pedantic string_scanner]
    - google_sign_in_platform_interface 2.0.1 [flutter meta quiver]
    - google_sign_in_web 0.10.0 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
    - http_client_helper 2.0.2 [http]
    - http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
    - image_picker_for_web 2.0.0 [image_picker_platform_interface meta flutter flutter_web_plugins]
    - image_picker_platform_interface 2.0.1 [flutter meta http plugin_platform_interface]
    - in_app_review_platform_interface 2.0.2 [flutter url_launcher plugin_platform_interface platform]
    - js 0.6.3
    - logging 1.0.0
    - matcher 0.12.10 [stack_trace]
    - meta 1.3.0
    - mime 1.0.0
    - nested 1.0.0 [flutter]
    - octo_image 1.0.0-nullsafety.1 [flutter flutter_blurhash]
    - package_config 2.0.0 [path]
    - path 1.8.0
    - path_parsing 0.2.0-nullsafety.0 [vector_math meta]
    - path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter]
    - path_provider_macos 2.0.0 [flutter]
    - path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface]
    - path_provider_windows 2.0.0 [path_provider_platform_interface meta path flutter ffi win32]
    - pedantic 1.11.0
    - permission_handler_platform_interface 3.1.1 [flutter meta plugin_platform_interface]
    - petitparser 4.0.2 [meta]
    - platform 3.0.0
    - plugin_platform_interface 2.0.0 [meta]
    - process 4.2.0 [file path platform]
    - pub_semver 2.0.0 [collection]
    - quiver 3.0.0 [matcher]
    - share_plus_linux 2.0.0 [share_plus_platform_interface file flutter meta url_launcher]
    - share_plus_macos 2.0.0 [share_plus_platform_interface flutter]
    - share_plus_platform_interface 2.0.0 [flutter meta mime plugin_platform_interface]
    - share_plus_web 2.0.0 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta]
    - share_plus_windows 2.0.0 [share_plus_platform_interface flutter meta url_launcher]
    - shared_preferences_linux 2.0.0 [flutter file meta path path_provider_linux shared_preferences_platform_interface]
    - shared_preferences_macos 2.0.0 [shared_preferences_platform_interface flutter]
    - shared_preferences_platform_interface 2.0.0 [flutter]
    - shared_preferences_web 2.0.0 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
    - shared_preferences_windows 2.0.0 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows]
    - sky_engine 0.0.99
    - source_span 1.8.0 [charcode collection path term_glyph]
    - sqflite 2.0.0+3 [flutter sqflite_common path]
    - sqflite_common 2.0.0+2 [synchronized path meta]
    - stack_trace 1.10.0 [path]
    - stream_channel 2.1.0 [async]
    - stream_disposable 0.1.0 [flutter]
    - stream_transform 2.0.0
    - string_scanner 1.1.0 [charcode source_span]
    - syncfusion_flutter_core 18.4.49 [flutter]
    - synchronized 3.0.0
    - term_glyph 1.2.0
    - test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
    - typed_data 1.3.0 [collection]
    - universal_io 1.0.1 [meta zone_local]
    - url_launcher_linux 2.0.0 [flutter]
    - url_launcher_macos 2.0.0 [flutter]
    - url_launcher_platform_interface 2.0.2 [flutter plugin_platform_interface]
    - url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins]
    - url_launcher_windows 2.0.0 [flutter]
    - uuid 3.0.2 [crypto]
    - vector_math 2.1.0
    - video_player_platform_interface 4.0.0 [flutter meta flutter_test]
    - video_player_web 2.0.0 [flutter flutter_web_plugins meta video_player_platform_interface]
    - watcher 1.0.0 [async path pedantic]
    - win32 2.0.4 [ffi]
    - xdg_directories 0.2.0 [meta path process]
    - xml 5.0.2 [collection meta petitparser]
    - yaml 3.1.0 [collection source_span string_scanner]
    - zone_local 0.1.2
    

    opened by diegocom 25
  • Google Mobile Ads SDK Developers Privacy  •  Terms Flutter App crashes when

    Google Mobile Ads SDK Developers Privacy • Terms Flutter App crashes when "google_mobile_ads: ^2.3.0" is added into pubspec.yaml

    Plugin Version

    "google_mobile_ads: ^2.3.0"

    So I want to put ads into my app. I followed the instructions from (https://developers.google.com/ad-manager/mobile-ads-sdk/flutter/banner/get-started) and added everything from the docs. When ever I run the app it stops at

    Running Gradle task 'assembleDebug'... √ Built build\app\outputs\flutter-apk\app-debug.apk.

    then the app crashes.

    Here the pubspec, AndroidManifest and main.dart:

    pubspec.yaml:

    
    google_mobile_ads: ^2.3.0
    
    
    AndroidManifest.xml:
    
    <meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="ca-app-pub-3940256099942544~3347511713"/>
    
    and main.dart:
    
    import 'package:flutter/material.dart';
    import 'package:google_mobile_ads/google_mobile_ads.dart';
    
    Future<void> main() async {
    WidgetsFlutterBinding.ensureInitialized();
    MobileAds.instance.initialize();
    await Firebase.initializeApp();
    
    runApp(const MyApp(
    backgroundColor: Colors.black,
    ));
    }
    

    The app runs without the

    google_mobile_ads: ^2.3.0

    Others:

    
    minSdkVersion 23
    compileSdkVersion 33
    implementation 'com.google.android.gms:play-services-ads:7.5.0'
    implementation 'com.android.support:multidex:1.0.3'
    

    I Tried removing each code from the docs starting from

    MobileAds.instance.initialize();

    and running it each time. Found out that the

    google_mobile_ads: ^2.3.0

    Was the one causing it.

    Im new to this so any help is appreciated

    feedback required in triage 
    opened by XShrimpReal 2
  • The method to implement COPPA does not pass google play data safety

    The method to implement COPPA does not pass google play data safety

    Plugin Version

    2.3.0

    Steps to Reproduce

    Follow https://developers.google.com/admob/flutter/targeting section

    implement below

    await MobileAds.instance.initialize();
    await MobileAds.instance.updateRequestConfiguration(RequestConfiguration(
         tagForChildDirectedTreatment: TagForChildDirectedTreatment.yes));
    

    publish to google play

    Expected results:

    Pass google play

    Actual results:

    Google play reject aps with below error

    Policy Declaration - Data Safety Section: Device Or Other IDs Data Type - Device Or Other IDs (some common examples may include Advertising ID, Android ID, IMEI, BSSID, MAC address)

    After removing plugin googleads-mobile-flutter ; it works

    feedback required admob 
    opened by c0ffeec0der 4
  • Android changes for native templates

    Android changes for native templates

    Description

    Android changes for native templates. Adds source and resource files from https://github.com/googleads/googleads-mobile-android-native-templates.

    Related Issues

    *Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR.

    Checklist

    Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

    • [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
    • [ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
    • [ ] All existing and new tests are passing.
    • [ ] I updated/added relevant documentation (doc comments with ///).
    • [ ] The analyzer (flutter analyze) does not report any problems on my PR.
    • [ ] I read and followed the [Flutter Style Guide].
    • [ ] I signed the [CLA].
    • [ ] I am willing to follow-up on review comments in a timely manner.

    Breaking Change

    Does your PR require plugin users to manually update their apps to accommodate your change?

    • [ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
    • [ ] No, this is not a breaking change.
    opened by jjliu15 0
  • [Admob Campaigns] Banners showing black borders / not resizing in Flutter App

    [Admob Campaigns] Banners showing black borders / not resizing in Flutter App

    Hi! We are having issues with Flutter application using Image Banner from our own campaign. When we receive the ad and load it into the container (which is implemented as shown in the example app), we are sometimes seeing the container not being resized to the size of the image ad and remaining space is filled up with black background (see screenshot attached where our test-ad is only the green image)

    Could this be related to our campaign which includes multiple ads having different image ads sizes (320x100 and 300x250)? How is it possible to ensure that the container is getting resized to only the size of the image inside the ad and is it possible to change the black background color to something that fits to our apps ci?

    Screenshot 2022-12-19 133316

    Plugin Version

    2.0.1

    Steps to Reproduce

    • create app in AdMob
    • create ad units in AdMob
    • create campain
    • create new ads for campaign and use image ad as type (using different image sizes)
    • implement banner ads as shown in examples (as adaptive inline ads)
    banner ad admob 
    opened by ts8ta 12
  • Screenshot package stops working when using Google Ads

    Screenshot package stops working when using Google Ads

    I have an app in which I have integrated google ads as well as screenshot package to allow users to share a screenshot of a particular widget. Both packages independently work well. But screenshot package stops working if google ads are used.

    In screenshot package, one has to wrap any widget with screenshot controller and needs to call capture method on this controller to generate an image or a snapshot of that widget which can then be shared. But load method on BannerAd class is blocking image generation on screenshot package.

    Here is my code:

      BannerAd? _bannerAd;
    
      void _init() {
       // Set up banner ad 
       // _bannerAd = ...
    
          _bannerAd!.load(); // This is the line causing issues
        }
      }
    
    @override
      void initState() {
        super.initState();
        _init();
      }
    

    If I comment out this load method, then the screenshot works fine. Here is the code for screenshot package:

    Future<void> _shareScreenshot(BuildContext context) async {
        double pixelRatio = MediaQuery.of(context).devicePixelRatio;
        await controller!
            .capture(
          delay: const Duration(milliseconds: 10),
          pixelRatio: pixelRatio,
        )
            .then(
          (Uint8List? image) async {
            if (image != null) { // This if block will trigger if there is no load method on banner ad
              final directory = await getApplicationDocumentsDirectory();
              final imagePath = await File('${directory.path}/image.png').create();
              await imagePath.writeAsBytes(image);
    
              await Share.shareFiles([imagePath.path],
                  text: 'Some text');
            } else { // Else gets triggered if load is used
              print('Image is null');
            }
          },
        );
      }
    

    Plugin Version

    2.3.0

    Steps to Reproduce

    Integrate

    Expected results: Google ads and screenshot working fine

    Actual results: Google ads load method breaking something on screenshot package

    bug p2-medium e4-months banner ad 
    opened by chinmaysarupria 6
  • app_open_example  i can not see the ads

    app_open_example i can not see the ads

    i used demo app "app_open_example", i can not view any ads

    2022-12-16 15:00:10.938586+0800 Runner[43330:368902]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3746946879631096~9885571251
    2022-12-16 15:00:10.943363+0800 Runner[43330:368902]  - <Google>[I-ACS023007] Analytics v.100100000 started
    2022-12-16 15:00:10.950217+0800 Runner[43330:368902]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
    2022-12-16 15:00:11.021840+0800 Runner[43330:368895]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
    2022-12-16 15:00:11.099482+0800 Runner[43330:368895]  - <Google>[I-ACS023012] Analytics collection enabled
    2022-12-16 15:00:11.110551+0800 Runner[43330:368763] <Google> To get test ads on this device, set: 
    Objective-C
    	GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ GADSimulatorID ];
    Swift
    	GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ GADSimulatorID ]
    2022-12-16 15:00:11.135905+0800 Runner[43330:368763] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600002c3ca20> F8BB1C28-BAE8-11D6-9C31-00039315CD46
    2022-12-16 15:00:11.376733+0800 Runner[43330:368763] [Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
    2022-12-16 15:00:11.376901+0800 Runner[43330:368763] [Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
    2022-12-16 15:00:12.050652+0800 Runner[43330:368935] flutter: Instance of 'AppOpenAd' loaded
    2022-12-16 15:00:12.273902+0800 Runner[43330:368763] [Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
    2022-12-16 15:00:12.274029+0800 Runner[43330:368763] [Security] This method should not be called on the main thread as it may lead to UI unresponsiveness.
    2022-12-16 15:00:12.440696+0800 Runner[43330:368900] [asset] Failed to get sandbox extensions
    2022-12-16 15:00:12.481539+0800 Runner[43330:368900] [catalog] Unable to list voice folder
    2022-12-16 15:00:12.490732+0800 Runner[43330:368900] [catalog] Unable to list voice folder
    2022-12-16 15:00:12.494507+0800 Runner[43330:368900] [catalog] Unable to list voice folder
    2022-12-16 15:00:12.503471+0800 Runner[43330:368900] [catalog] Unable to list voice folder
    
    
    feedback required in triage 
    opened by dd9913762113 4
Releases(v2.1.0)
  • v2.1.0(Oct 28, 2022)

  • v2.0.1(Aug 15, 2022)

  • v2.0.0(Aug 3, 2022)

    • Updates GMA Android dependency to 21.0.0 and iOS to 9.6.0
    • Removes credentials from AdapterResponseInfo, which is replaced with adUnitMapping.
    • Removes serverSideVerificationOptions from RewardedAd.load() and RewardedInterstitialAd.load(), replacing them with setters RewardedAd.setServerSideVerificationOptions() and RewardedInterstitialAd.setServerSideVerificationOptions(). This lets you update the ssv after the ad is loaded.
    • Removes static testAdUnitId parameters. See the Admob and AdManager documentation for up to date test ad units.
    • Removes NativeAdListener.onNativeAdClicked. You should use onAdClicked instead, which present on all ad listeners.
    • Removes AdRequest.location
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Aug 3, 2022)

    • Adds support for programmatically opening the debug options menu usingMobileAds.openDebugMenu(String adUnitId)
    • Adds support for Ad inspector APIs. See the AdMob and Ad Manager sites for integration guides.
    • Adds support for User Messaging Platform. See the AdMob and Ad Manager sites for integration guides.
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Apr 4, 2022)

    1.2.0

    • Set new minimum height for FluidAdWidget. This is required after Flutter v2.11.0-0.1.pre because Android platform views that have no size don't load.
    • Update GMA Android dependency to 20.6.0 and iOS to 8.13.0.
    • Deprecate AdapterResponseInfo.credentials in favor of adUnitMapping
    • Deprecates LocationParams in AdRequest and AdManagerAdRequest.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Feb 10, 2022)

    • Adds support for Rewarded Interstitial (beta) ad format.
      • See Admob and AdManager devsites for guides on how to add RewardedInterstitial
    • Adds support for onAdClicked events to all ad formats. NativeAdListener.onNativeAdClicked is now deprecated.
      • FullScreenContentCallback and AdWithViewListeners now have an onAdClicked event.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Nov 17, 2021)

    • Mediation is now supported in beta.

    • Fix for Android 12 issue #330.

      • This will break compilation on android if you do not already set compileSdkVersion to 31, or override the WorkManager dependency to < 2.7.0:
        dependencies {
            implementation('androidx.work:work-runtime') {
                version {
                    strictly '2.6.0'
                }
            }
        }
        
    • Fixes issue #404.

      • Adds a new dart class, AppStateEventNotifier. You should subscribe to AppStateEventNotifier.appStateStream instead of using WidgetsBindingObserver to listen to app foreground/background events.
      • See the app open example app for a reference on how to use the new API.
    • Adds a new parameter extras to AdRequest and AdManagerAdRequest.

      • This can be used to pass additional signals to the AdMob adapter, such as CCPA signals.
      • For example, to notify Google that RDP should be enabled when constructing an ad request:
          AdRequest request = AdRequest(extras: {'rdp': '1'});
        
        
    • The development guides in the README have been migrated to the AdMob and Ad Manager dev sites.

    Source code(tar.gz)
    Source code(zip)
  • v0.13.6(Nov 3, 2021)

    • Partial fix for #265.
      • The partial fix allows you to load ads from a cached flutter engine in the add to app scenario, but it only works the first time the engine is attached to an activity.
      • Support for reusing the engine in another activity after the first one is destroyed is blocked by this Flutter issue which affects all platform views: https://github.com/flutter/flutter/issues/88880.
    • Adds support for getRequestConfiguration API
    • Adds support for Fluid Ad Size (Ad Manager only)
      • Fluid ads dynamically adjust their height based on their width. To help display them we've added a new ad container, FluidAdManagerBannerAd, and a new widget FluidAdWidget.
      • You can see the fluid_example.dart for a reference of how to load and display a fluid ad.
      • Android API reference
      • iOS API reference
    • Adds AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize() to support getting an AnchoredAdaptiveBannerAdSize in the current orientation.
      • Previously the user had to specify an orientation (portrait / landscape) to create an AnchoredAdaptiveBannerAdSize. It has been made optional with this version. SDK will determine the current orientation of the device and return an appropriate AdSize.
      • More information on anchored adaptive banners can be found here:
    • Adds support for inline adaptive banner ads.
      • Inline adaptive banner ads are meant to be used in scrollable content. They are of variable height and can be as tall as the device screen. They differ from Fluid ads in that they only resize once when the ad is loaded. You can see the inline_adaptive_example.dart for a reference of how to load and display inline adaptive banners.
      • More information on inline adaptive banners can be found here:
    • Fix for #369
      • Fixes setting the app volume in android (doesn't affect iOS).
    • Adds support for setting location in AdRequest and AdManagerAdRequest.
      • Both AdRequest and AdManagerAdRequest have a new param, location.
      • Location data is not used to target Google Ads, but may be used by 3rd party ad networks.
      • See other packages for getting the location. For example, https://pub.dev/packages/location.
    • Adds publisherProvidedId to AdManagerAdRequest to support publisher provided ids.
    Source code(tar.gz)
    Source code(zip)
  • v0.13.5(Sep 27, 2021)

  • v0.13.4(Sep 27, 2021)

    • Adds support for muting and setting the volume level of the app.
    • Visit the following links for more information:
      • https://developers.google.com/admob/android/global-settings#video_ad_volume_control
      • https://developers.google.com/android/reference/com/google/android/gms/ads/MobileAds#public-static-void-setappvolume-float-volume
    • Adds support for setting immersive mode for Rewarded and Interstitial Ads in Android.
    • Visit the following links for more information:
      • https://developers.google.com/android/reference/com/google/android/gms/ads/interstitial/InterstitialAd?hl=en#setImmersiveMode(boolean)
      • https://developers.google.com/android/reference/com/google/android/gms/ads/rewarded/RewardedAd#setImmersiveMode(boolean)
    • Adds support for disableSDKCrashReporting in iOS; disableMediationInitialization and getVersionString in both the platforms.
      • https://developers.google.com/admob/ios/api/reference/Classes/GADMobileAds#-disablesdkcrashreporting
      • iOS (disableMediationInitialization): https://developers.google.com/admob/ios/api/reference/Classes/GADMobileAds#-disablemediationinitialization
      • Android (disableMediationAdapterInitialization): https://developers.google.com/android/reference/com/google/android/gms/ads/MobileAds#public-static-void-disablemediationadapterinitialization-context-context
      • https://developers.google.com/android/reference/com/google/android/gms/ads/MobileAds#getVersionString()
    Source code(tar.gz)
    Source code(zip)
  • v0.13.3(Aug 4, 2021)

  • v0.13.2+1(Jul 29, 2021)

  • v0.13.2(Jun 30, 2021)

  • v0.13.1(Jun 23, 2021)

  • v0.13.0(May 18, 2021)

    This is a major version bump that updates the GMA Android and iOS dependencies to 20.1.0 and 8.5.0. There are several breaking API changes.

    • Renames APIs that use the Publisher prefix to AdManager.
    • Rewarded and Interstitial ads now provide static load methods and a new FullScreenContentCallback for full screen events.
    • Native ads use GADNativeAdView for iOS and NativeAdView on Android.
    • Adds support for ResponseInfo.
    • Adds support for same app key on iOS.
    • Removes testDevices from AdRequest. Use MobileAds.updateRequestConfiguration to set test device ids.
    • Removes Ad.isLoaded(). Instead you should use the onAdLoaded callback to track whether an ad is loaded.
    • Removes need to call Ad.dispose() for Rewarded and Interstitial ads when they fail to load.
    Source code(tar.gz)
    Source code(zip)
  • v0.12.2+1(May 17, 2021)

  • v0.12.2(May 13, 2021)

  • v0.12.1(Apr 14, 2021)

  • v0.12.0(Mar 29, 2021)

  • v0.11.0+4(Mar 19, 2021)

  • v0.11.0+1(Mar 11, 2021)

  • v0.11.0+3(Mar 11, 2021)

  • v0.11.0+2(Mar 11, 2021)

    • Set min Android version to 19.
    • Fixes bug that displayed "This AdWidget is already in the Widget tree".
    • Update minimum gradle version.
    • Add references to the codelab in the README.
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Mar 3, 2021)

Owner
Google Ads
Google Ads
A flutter demo app to implement google admob ads

test_ads A Flutter demo app to implement google admob ads. Getting Started important - if you are cloning the repo to your desktop, you will need to p

null 4 Apr 4, 2022
This Dart package will utilize the plugin, google_mobile_ads, so to quickly and easily implement ads into a Flutter app.

Ads to your App in a Snap! This Dart package will utilize the plugin, google_mobile_ads, so to quickly and easily implement ads into a Flutter app

Andrious Solutions Ltd. 58 Sep 11, 2022
Cross platform application for iOS and Android using Google's SDK Flutter.

scout Cross platform application for iOS and Android using Google's SDK Flutter. Launch screen for the application. The menu for selecting cookies. Cu

null 0 Nov 9, 2021
In this video, we learn how to do integrate Google Admob with Flutter with latest Flutter 2.0 Google Admob Package.

?? Monetizing Flutter apps with Google AdMob ?? In this video, we learn how to do integrate Google Admob with Flutter with latest Flutter 2.0 Google A

SnippetCoder 14 Nov 30, 2022
A Translator App Which is Build using Flutter, Speech To Text, Google ML Kit, Google Translator and Text To Speech.

AI Translator This is a Translator App Which is Build using Flutter, Speech To Text, Google ML Kit, Google Translator and Text To Speech. Download App

null 4 Jul 16, 2022
Official plugin for using Thepeer SDK with flutter https://thepeer.co

Flutter Thepeer This package makes it easy to use the Thepeer in a flutter project. ?? Screen Shots ?? How to Use plugin ThePeer Send Launch ThepeerSe

The Peer 23 Dec 27, 2022
A Flutter plugin that supports Pangle SDK on Android and iOS.

Thanks for non-commercial open source development authorization by JetBrains. 穿山甲 Flutter SDK `pangle_flutter`是一款集成了字节跳动穿山甲 Android 和 iOS SDK的 Flutter

null 121 Dec 2, 2022
A Flutter plugin for Yandex AppMetrica SDK, a marketing platform for app install attribution, app analytics, and push campaigns.

appmetrica_sdk A Flutter plugin for Yandex AppMetrica SDK. Plugin implementation status Implemented Events Profiles Not implemented yet Revenue. Comin

EM ALL iT Studio 15 Oct 21, 2021
Official plugin for using Thepeer SDK with flutter https://thepeer.co

Flutter Thepeer This package makes it easy to use the Thepeer in a flutter project. ?? Screen Shots ?? How to Use plugin Adding MaterialSupport Add th

Thepeer 23 Dec 27, 2022
Real-world movie database mobile application with the Flutter SDK and DDD clean architecture.

Moving Pictures Moving Pictures is a mobile application built with the Flutter SDK for Android and iOS. It’s an application that gets the information

Nifemi 57 Jan 7, 2023
Sample app to demonstrate the integration and working of Dyte SDK for mobile, using Flutter.

Flutter Sample App by dyte Sample App to demonstrate Dyte SDK in flutter Explore the docs » View Demo · Report Bug · Request Feature Table of Contents

Dyte 12 Jan 1, 2023
Flutter implementation of Google Mobile Vision.

flutter_mobile_vision Flutter implementation for Google Mobile Vision. Based on Google Mobile Vision. Android Samples -=- iOS Samples Liked? ⭐ Star th

Eduardo Folly 450 Jan 6, 2023
Google IO Mobile Version (Fake)

fake_google_io Fake Google IO made with flutter (Not official!) Inspiration This application was made to enliven the Google I/O 2021 event which was h

Irvan Lutfi Gunawan 4 May 20, 2021
This is a clone of the Google News mobile app.

gnewsclone This is a clone of the Google News mobile app. I will try to develop it as close as possible. I am new to Flutter, and I might end refactor

Degreat 10 Sep 18, 2022
Stream Feed official Flutter SDK. Build your own feed experience using Dart and Flutter.

Official Flutter packages for Stream Activity Feeds The official Dart client for Stream Activity Feeds, a service for building activity feed applicati

Stream 67 Sep 26, 2022
Pensil Community official Flutter SDK. Build your own community experience using Dart and Flutter.

Official flutter package for Pensil The official Dart client for Pensil communities, a service for building communites applications. This library can

Pensil Inc 6 Oct 6, 2022
P2P payment solution using Stream's Flutter SDK and Rapyd's Wallet API

Peer-to-peer payment integration to a messaging app using Flutter ?? This project shows how to integrate a peer-to-peer payment solution to your Strea

Souvik Biswas 15 Dec 8, 2022
Hybrid App build on flutter SDK able to run on Android, IOS, web, desktop

Codeforces Visualizer APP Ready to use Flutter Application. Uses codeforces API. Useful for codeforces programmers. ScreenShots Single User Page Compa

vikas yadav 13 Dec 31, 2022
A simple chat app UI using flutter SDK project.

Chatty App A simple chat app UI using flutter SDK project. Screenshot Getting Started This project is a starting point for a Flutter application. A fe

Tengku Belmiro 5 Jul 15, 2022