Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when navigating away immediately from page containing EasyBannerAd in Flutter #109

Open
huzaibsayyed opened this issue Dec 15, 2024 · 0 comments

Comments

@huzaibsayyed
Copy link

When navigating away from a page containing EasyBannerAd in a Flutter app, an exception occurs. It appears that the ad is not properly disposed of when the widget is removed from the widget tree, leading to potential memory leaks or crashes. Calling the ad's dispose() method in the dispose lifecycle hook of the page does not resolve the issue.

bottomNavigationBar: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          screenWidth > 768
              ? EasyBannerAd(
                  adNetwork: AdNetwork.admob,
                  adSize: AdSize(
                    height: 150,
                    width: MediaQuery.of(context).size.width.toInt(),
                  ),
                )
              : EasyBannerAd(
                  adNetwork: AdNetwork.admob,
                  adSize: AdSize(
                    height: 100,
                    width: MediaQuery.of(context).size.width.toInt(),
                  ),
                ),
        ],
      ),

Screenshot 2024-12-16 at 3 02 32 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant