Closed abdullah432 closed 1 year ago
Hi @abdullah432 Your sample code above contains some 3rd party package and usage of other class.
You should narrow down the issue by removing the usage of 3rd party plugins/packages one by one, unrelated/unaffected pages, and isolating the affected page into a single main.dart
file that can be run independently.
If the issue's still reproducible, please provide that main.dart
file so that we can verify the issue properly. Thanks!
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.
Plugin Version
google_mobile_ads: ^3.0.0
Steps to Reproduce
GoogleAdsService.dart
bannerAdProvider
UI
Actual results: After showing ad, it's start printing logs after few seconds After showing BannerAd
After 10 to 15 second, keep getting this log
After closing Interstitial Ad
Logs
``` Analyzing starcrawler... info • The declaration '_showMaterialDialog' isn't referenced • lib/screens/editTextPage.dart:324:3 • unused_element info • The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/screens/selectMusic.dart:12:8 • unnecessary_import info • The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/screens/settingPage.dart:6:8 • unnecessary_import ``` ``` [✓] Flutter (Channel stable, 3.10.1, on macOS 13.0 22A8380 darwin-arm64, locale en-PK) • Flutter version 3.10.1 on channel stable at /Users/abdullahkhan/Documents/Development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision d3d8effc68 (4 weeks ago), 2023-05-16 17:59:05 -0700 • Engine revision b4fb11214d • Dart version 3.0.1 • DevTools version 2.23.1 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /Users/abdullahkhan/Library/Android/sdk • Platform android-33, build-tools 33.0.1 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E222b • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.1) • 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.15+0-b2043.56-8887301) [✓] VS Code (version 1.79.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.66.0 ```Primary concern Straight forward approach will be to declare BannerAd inside statefulwidget and dispose it at dispose method but I'm using riverpod to achieve it so not sure if there is any issue in my code or in plugin or nothing wrong it's normal logs.