googleads / googleads-mobile-flutter

A Flutter plugin for the Google Mobile Ads SDK
Apache License 2.0
336 stars 275 forks source link

Not showing banner #43

Closed erperejildo closed 3 years ago

erperejildo commented 3 years ago

Bug report

It doesn't display any banner and if I refresh the state of my app it throws an error and closes it

Steps to reproduce

I followed exactly the same steps described here: https://youtu.be/yll3SNXvQCw?t=13995

Expected behavior

I should see the banner

Additional context

You can see the empty block without banner here at the bottom:

Screenshot_1614992406

banner != null
                  ? Container(
                      color: Colors.white,
                      height: 50.0,
                      child: AdWidget(ad: banner),
                    )
                  : Container()

If I refresh at this point this is the error that I get before losing the connection with the emulator:

(package:flutter/src/services/message_codecs.dart:582:7)
E/flutter (10665): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
E/flutter (10665): <asynchronous suspension>
E/flutter (10665): #2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
E/flutter (10665): #3      AdInstanceManager.loadBannerAd (package:google_mobile_ads/src/ad_instance_manager.dart:132:20)
E/flutter (10665): #4      BannerAd.load (package:google_mobile_ads/src/ad_containers.dart:455:27)
E/flutter (10665): #5      _MyAppState.didChangeDependencies.<anonymous closure>.<anonymous closure> (package:my_rents/main.dart:87:12)
E/flutter (10665): #6      State.setState (package:flutter/src/widgets/framework.dart:1244:30)
E/flutter (10665): #7      _MyAppState.didChangeDependencies.<anonymous closure> (package:my_rents/main.dart:81:7)
E/flutter (10665): #8      _rootRunUnary (dart:async/zone.dart:1198:47)
E/flutter (10665): #9      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (10665): #10     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
E/flutter (10665): #11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
E/flutter (10665): #12     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
E/flutter (10665): #13     Future._addListener.<anonymous closure> (dart:async/future_impl.dart:393:9)
E/flutter (10665): #14     _rootRun (dart:async/zone.dart:1190:13)
E/flutter (10665): #15     _CustomZone.run (dart:async/zone.dart:1093:19)
E/flutter (10665): #16     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
E/flutter (10665): #17     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
E/flutter (10665): #18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter (10665): #19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` [✓] Flutter (Channel stable, 1.22.6, on macOS 11.1 20C69 darwin-x64, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [✓] 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. <---- these 2 lines are fine [✓] Connected device (1 available) ! Doctor found issues in 1 category. ```

Flutter dependencies

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

Click To Expand ``` - add_2_calendar 1.4.0 [flutter] - admob_flutter 1.0.1 [flutter meta] - after_init 0.1.2 [flutter] - apple_sign_in 0.1.0 [flutter] - cached_network_image 2.5.0 [flutter flutter_cache_manager octo_image] - carousel_slider 2.3.4 [flutter] - characters 1.1.0-nullsafety.3 - cloud_firestore 0.14.4 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web] - cloudinary_client 0.0.9 [dio crypto] - cloudinary_public 0.6.2 [flutter dio] - contacts_service 0.4.6 [flutter collection quiver] - country_currency_pickers 1.0.1 [flutter] - country_pickers 1.3.0 [flutter] - cupertino_icons 1.0.0 - dapackages 1.4.0 [yaml http] - device_info 0.4.2+10 [flutter device_info_platform_interface] - drag_and_drop_gridview 1.0.8 [flutter] - file_picker 2.1.6 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface] - firebase_analytics 6.3.0 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface] - firebase_auth 0.18.4+1 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter] - firebase_core 0.5.3 [firebase_core_platform_interface flutter quiver meta firebase_core_web] - flappy_search_bar 1.7.2 [flutter async flutter_staggered_grid_view] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_cupertino_localizations 1.0.1 [flutter flutter_localizations] - flutter_downloader 1.5.2 [flutter] - flutter_email_sender 3.0.1 [flutter] - flutter_facebook_login 3.0.0 [flutter collection] - flutter_google_places 0.2.6 [flutter rxdart google_maps_webservice http] - flutter_launcher_icons 0.8.1 [image args yaml path] - flutter_localizations 0.0.0 [flutter intl characters collection meta path typed_data vector_math] - flutter_native_splash 0.1.9 [yaml image color] - flutter_open_whatsapp 0.1.2 [flutter] - flutter_platform_widgets 0.70.2 [flutter] - flutter_staggered_grid_view 0.3.3 [flutter] - flutter_svg 0.19.1 [flutter meta path_drawing vector_math xml] - flutter_translate 1.6.0 [flutter flutter_device_locale] - google_mobile_ads 0.11.0+1 [meta flutter] - google_sign_in 4.5.9 [google_sign_in_platform_interface flutter meta google_sign_in_web] - http 0.12.2 [http_parser path pedantic] - image 2.1.19 [archive xml meta] - image_picker 0.6.7+22 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - in_app_purchase 0.3.5+1 [async collection flutter json_annotation meta] - intl 0.16.1 [path] - intl_phone_number_input 0.5.2+2 [flutter meta libphonenumber equatable] - maps_launcher 1.2.2+2 [flutter flutter_web_plugins url_launcher] - open_file 3.0.3 [flutter ffi] - package_info 0.4.3+4 [flutter] - path_provider 1.6.27 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - pdf 1.13.0 [archive barcode crypto image meta path_parsing vector_math xml] - permission_handler 5.0.1+1 [flutter meta permission_handler_platform_interface] - printing 3.7.2 [flutter flutter_web_plugins image js meta pdf plugin_platform_interface] - progress_dialog 1.2.4 [flutter] - provider 4.3.3 [collection flutter nested] - reorderables 0.3.2 [flutter] - shared_preferences 0.5.12+4 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows] - table_calendar 2.3.3 [flutter intl simple_gesture_detector] - transparent_image 1.0.0 - url_launcher 5.7.10 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows] - uuid 2.2.2 [crypto convert] 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: - archive 2.0.13 [crypto args path] - args 1.6.0 - async 2.5.0-nullsafety.1 [collection] - barcode 1.17.1 [meta qr] - boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner] - charcode 1.2.0-nullsafety.1 - clock 1.1.0-nullsafety.1 - cloud_firestore_platform_interface 2.2.1 [flutter meta collection firebase_core plugin_platform_interface] - cloud_firestore_web 0.2.1+2 [flutter flutter_web_plugins http_parser meta firebase_core firebase_core_web cloud_firestore_platform_interface js] - collection 1.15.0-nullsafety.3 - color 2.1.1 - convert 2.1.1 [charcode typed_data] - crypto 2.1.5 [collection convert typed_data] - device_info_platform_interface 1.0.1 [flutter meta plugin_platform_interface] - dio 3.0.10 [http_parser path] - equatable 1.2.5 [collection meta] - fake_async 1.2.0-nullsafety.1 [clock collection] - ffi 0.1.3 - file 5.2.1 [intl meta path] - firebase 7.3.3 [http http_parser js] - firebase_analytics_platform_interface 1.0.3 [flutter meta] - firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta] - firebase_auth_platform_interface 2.1.4 [flutter meta firebase_core plugin_platform_interface] - firebase_auth_web 0.3.2+3 [flutter flutter_web_plugins meta http_parser intl firebase_core firebase_core_web firebase_auth_platform_interface js] - firebase_core_platform_interface 2.1.0 [flutter meta plugin_platform_interface quiver] - firebase_core_web 0.2.1+1 [firebase_core_platform_interface flutter flutter_web_plugins meta js] - flutter_blurhash 0.5.0 [flutter meta] - flutter_cache_manager 2.1.1 [flutter path_provider uuid http path sqflite pedantic clock file rxdart image] - flutter_device_locale 0.4.0 [flutter flutter_web_plugins plugin_platform_interface] - flutter_plugin_android_lifecycle 1.0.11 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math] - google_maps_webservice 0.0.19 [http meta] - google_sign_in_platform_interface 1.1.2 [flutter meta quiver] - google_sign_in_web 0.9.2 [google_sign_in_platform_interface flutter flutter_web_plugins meta js] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - image_picker_platform_interface 1.1.6 [flutter meta http plugin_platform_interface] - js 0.6.2 - json_annotation 3.1.1 - libphonenumber 1.0.2 [flutter meta] - matcher 0.12.10-nullsafety.1 [stack_trace] - meta 1.3.0-nullsafety.3 - nested 0.0.4 [flutter] - octo_image 0.3.0 [flutter flutter_blurhash] - path 1.8.0-nullsafety.1 - path_drawing 0.4.1+1 [vector_math meta path_parsing flutter] - path_parsing 0.1.4 [vector_math meta] - path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 0.0.4+8 [flutter] - path_provider_platform_interface 1.0.4 [flutter meta platform plugin_platform_interface] - path_provider_windows 0.0.4+3 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.9.2 [meta] - permission_handler_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - petitparser 3.1.0 [meta] - platform 2.2.1 - plugin_platform_interface 1.0.3 [meta] - process 3.0.13 [file intl meta path platform] - qr 1.3.0 [meta] - quiver 2.1.5 [matcher meta] - rxdart 0.24.1 - shared_preferences_linux 0.0.2+4 [file flutter meta path path_provider_linux shared_preferences_platform_interface] - shared_preferences_macos 0.0.1+11 [shared_preferences_platform_interface flutter] - shared_preferences_platform_interface 1.0.4 [meta flutter] - shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta] - shared_preferences_windows 0.0.2+2 [shared_preferences_platform_interface flutter ffi file meta path path_provider_platform_interface path_provider_windows] - simple_gesture_detector 0.1.6 [flutter] - sky_engine 0.0.99 - source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph] - sqflite 1.3.2+2 [flutter sqflite_common path] - sqflite_common 1.0.3+1 [synchronized path meta] - stack_trace 1.10.0-nullsafety.1 [path] - stream_channel 2.1.0-nullsafety.1 [async] - string_scanner 1.1.0-nullsafety.1 [charcode source_span] - synchronized 2.2.0+2 - 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] - url_launcher_linux 0.0.1+4 [flutter] - url_launcher_macos 0.0.1+9 [flutter] - url_launcher_platform_interface 1.0.9 [flutter meta plugin_platform_interface] - url_launcher_web 0.1.5+3 [url_launcher_platform_interface flutter flutter_web_plugins meta] - url_launcher_windows 0.0.1+3 [flutter] - vector_math 2.1.0-nullsafety.3 - win32 1.7.4+1 [ffi] - xdg_directories 0.1.2 [meta path process] - xml 4.5.1 [collection convert meta petitparser] - yaml 2.2.1 [charcode collection string_scanner source_span]```

oliverbytes commented 3 years ago

Could you show your whole banner ad code implementation please?

erperejildo commented 3 years ago

I didn't mention it but I had running before firebase_admob so all admob/ios/android setup it's fine

import 'dart:io';

import 'package:google_mobile_ads/google_mobile_ads.dart';

class AdState {
  Future<InitializationStatus> initialization;

  AdState(this.initialization);

  String get bannerAdUnitId => Platform.isAndroid
      ? 'idANDROID'
      : 'idIOS';

  AdListener get adListener => _adListener;

  AdListener _adListener = AdListener(
    onAdLoaded: (ad) => print("ad loaded ${ad.adUnitId}"),
    onAdOpened: (ad) => print("ad loaded ${ad.adUnitId}"),
    onAdClosed: (ad) => print("ad loaded ${ad.adUnitId}"),
  );
}
final initFuture = MobileAds.instance.initialize();
final adState = AdState(initFuture);
runApp(
    LocalizedApp(
      delegate,
      Provider.value(
        value: adState,
        builder: (context, child) => MyApp(),
      ),
    ),
  );

Above the code I put on the question I have this:


@override
  void didChangeDependencies() {
    super.didChangeDependencies();
    final adState = Provider.of<AdState>(context);
    adState.initialization.then((status) {
      setState(() {
        banner = BannerAd(
          adUnitId: adState.bannerAdUnitId,
          size: AdSize.banner,
          request: AdRequest(),
          listener: adState.adListener,
        )..load();
      });
    });
  }
erperejildo commented 3 years ago

I followed as mentioned the approach described in the Flutter Engage presentation. I noticed it's not the same as you proposed in the README.

To be honest I feel I bit lost with the official way to display ads in Flutter. I was using firebase_admob and it was working fine but now they presented this package and didn't mention what to do with the previous one. Is it deprecated? And should we follow the approach described here or the one from the video?

erperejildo commented 3 years ago

More info

Despite this triggers:

Screenshot 2021-03-06 at 11 11 04

This never does it:

Screenshot 2021-03-06 at 11 11 54
JoacimV commented 3 years ago

@erperejildo did you figure this out, i'm having the same problem, also used to work with the previous firebase package here?

erperejildo commented 3 years ago

@erperejildo did you figure this out, i'm having the same problem, also used to work with the previous firebase package here?

No, and I have to say that I also created a new project from scratch and copied my files to it

erperejildo commented 3 years ago

No comments yet?

maheshj01 commented 3 years ago

Hi @erperejildo, Thanks for filing the issue, I was able to run the ads sample code on the latest stable channel of flutter with google_mobile_Ads: ^0.13.2 could you please try this sample code on the latest stable version of flutter and see if this helps.

code sample ``` import 'dart:io'; import 'package:flutter/material.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; void main() { WidgetsFlutterBinding.ensureInitialized(); MobileAds.instance.initialize(); runApp(MyApp()); } // You can also test with your own ad unit IDs by registering your device as a // test device. Check the logs for your device's ID value. const String testDevice = 'YOUR_DEVICE_ID'; const int maxFailedLoadAttempts = 3; class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State { static final AdRequest request = AdRequest( keywords: ['foo', 'bar'], contentUrl: 'http://foo.com/bar.html', nonPersonalizedAds: true, ); InterstitialAd? _interstitialAd; int _numInterstitialLoadAttempts = 0; RewardedAd? _rewardedAd; int _numRewardedLoadAttempts = 0; BannerAd? _anchoredBanner; bool _loadingAnchoredBanner = false; @override void initState() { super.initState(); _createInterstitialAd(); _createRewardedAd(); } void _createInterstitialAd() { InterstitialAd.load( adUnitId: InterstitialAd.testAdUnitId, request: request, adLoadCallback: InterstitialAdLoadCallback( onAdLoaded: (InterstitialAd ad) { print('$ad loaded'); _interstitialAd = ad; _numInterstitialLoadAttempts = 0; }, onAdFailedToLoad: (LoadAdError error) { print('InterstitialAd failed to load: $error.'); _numInterstitialLoadAttempts += 1; _interstitialAd = null; if (_numInterstitialLoadAttempts <= maxFailedLoadAttempts) { _createInterstitialAd(); } }, )); } void _showInterstitialAd() { if (_interstitialAd == null) { print('Warning: attempt to show interstitial before loaded.'); return; } _interstitialAd!.fullScreenContentCallback = FullScreenContentCallback( onAdShowedFullScreenContent: (InterstitialAd ad) => print('ad onAdShowedFullScreenContent.'), onAdDismissedFullScreenContent: (InterstitialAd ad) { print('$ad onAdDismissedFullScreenContent.'); ad.dispose(); _createInterstitialAd(); }, onAdFailedToShowFullScreenContent: (InterstitialAd ad, AdError error) { print('$ad onAdFailedToShowFullScreenContent: $error'); ad.dispose(); _createInterstitialAd(); }, ); _interstitialAd!.show(); _interstitialAd = null; } void _createRewardedAd() { RewardedAd.load( adUnitId: RewardedAd.testAdUnitId, request: request, rewardedAdLoadCallback: RewardedAdLoadCallback( onAdLoaded: (RewardedAd ad) { print('$ad loaded.'); _rewardedAd = ad; _numRewardedLoadAttempts = 0; }, onAdFailedToLoad: (LoadAdError error) { print('RewardedAd failed to load: $error'); _rewardedAd = null; _numRewardedLoadAttempts += 1; if (_numRewardedLoadAttempts <= maxFailedLoadAttempts) { _createRewardedAd(); } }, )); } void _showRewardedAd() { if (_rewardedAd == null) { print('Warning: attempt to show rewarded before loaded.'); return; } _rewardedAd!.fullScreenContentCallback = FullScreenContentCallback( onAdShowedFullScreenContent: (RewardedAd ad) => print('ad onAdShowedFullScreenContent.'), onAdDismissedFullScreenContent: (RewardedAd ad) { print('$ad onAdDismissedFullScreenContent.'); ad.dispose(); _createRewardedAd(); }, onAdFailedToShowFullScreenContent: (RewardedAd ad, AdError error) { ad.dispose(); _createRewardedAd(); }, ); _rewardedAd!.show(onUserEarnedReward: (RewardedAd ad, RewardItem reward) { print('$ad with reward $RewardItem(${reward.amount}, ${reward.type}'); }); _rewardedAd = null; } Future _createAnchoredBanner(BuildContext context) async { final AnchoredAdaptiveBannerAdSize? size = await AdSize.getAnchoredAdaptiveBannerAdSize( Orientation.portrait, MediaQuery.of(context).size.width.truncate(), ); if (size == null) { print('Unable to get height of anchored banner.'); return; } final BannerAd banner = BannerAd( size: size, request: request, adUnitId: Platform.isAndroid ? '' : '', listener: BannerAdListener( onAdLoaded: (Ad ad) { print('$BannerAd loaded.'); setState(() { _anchoredBanner = ad as BannerAd?; }); }, onAdFailedToLoad: (Ad ad, LoadAdError error) { print('$BannerAd failedToLoad: $error'); ad.dispose(); }, onAdOpened: (Ad ad) => print('$BannerAd onAdOpened.'), onAdClosed: (Ad ad) => print('$BannerAd onAdClosed.'), ), ); return banner.load(); } @override void dispose() { super.dispose(); _interstitialAd?.dispose(); _rewardedAd?.dispose(); _anchoredBanner?.dispose(); } @override Widget build(BuildContext context) { return MaterialApp( home: Builder(builder: (BuildContext context) { if (!_loadingAnchoredBanner) { _loadingAnchoredBanner = true; _createAnchoredBanner(context); } return Scaffold( appBar: AppBar( title: const Text('AdMob Plugin example app'), actions: [ PopupMenuButton( onSelected: (String result) { switch (result) { case 'InterstitialAd': _showInterstitialAd(); break; case 'RewardedAd': _showRewardedAd(); break; default: throw AssertionError('unexpected button: $result'); } }, itemBuilder: (BuildContext context) => >[ PopupMenuItem( value: '$InterstitialAd', child: Text('$InterstitialAd'), ), PopupMenuItem( value: '$RewardedAd', child: Text('$RewardedAd'), ), ], ), ], ), body: SafeArea( child: Stack( alignment: AlignmentDirectional.bottomCenter, children: [ ListView.builder( itemCount: 20, itemBuilder: (_, x) => ListTile( title: Text('item $x'), )), if (_anchoredBanner != null) Container( color: Colors.green, width: _anchoredBanner!.size.width.toDouble(), height: _anchoredBanner!.size.height.toDouble(), child: AdWidget(ad: _anchoredBanner!), ), ], ), ), ); }), ); } } ```
flutter doctor -v ``` [✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-arm, locale en-GB) • Flutter version 2.2.3 at /Users/mahesh/Documents/flutter • Framework revision f4abaa0735 (4 weeks ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/mahesh/Library/Android/sdk • Platform android-30, build-tools 30.0.3 • ANDROID_HOME = /Users/mahesh/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.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.8+10-b944.6916264) [✓] IntelliJ IDEA Community Edition (version 2021.1.2) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 57.0.5 • Dart plugin version 211.7233 [✓] VS Code (version 1.58.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.24.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 11.4 20F71 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.164 • No issues found! ```

Thank you.

erperejildo commented 3 years ago

I see it working now. Thanks

erperejildo commented 3 years ago

Hi @erperejildo, Thanks for filing the issue, I was able to run the ads sample code on the latest stable channel of flutter with google_mobile_Ads: ^0.13.2 could you please try this sample code on the latest stable version of flutter and see if this helps.

code sample flutter doctor -v Thank you.

do you know why the app is extremely slow while showing the ads?

maheshj01 commented 3 years ago

@erperejildo I did not see such behavior, If you do feel free to raise another issue with the appropriate reproducible steps.

Thanks