-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Banner is re-created/re-loaded with each Navigator push()/pop() #18
Comments
Have you found any solutions to that ? I have the same problem. --Update |
I was having a similar issue when the AdmobBanner widget was used in a ListView. I wrapped AdmobBanner into a custom AdmobBannerWrapper stateful widget with AutomaticKeepAliveClientMixin - the issue was resolved. |
I think the AdmobBanner widget should be implemented with AutomaticKeepAliveClientMixin out of the box because redundant reloading of banners should be avoided (because it generates false impressions?). One could optionally pass the value for the wantKeepAlive property in the constructor. |
@mmahkamov Can you help me out? How should be this Implemented? How did you resolve the issue? |
I've just wrapped AdmobBanner inside a stateful widget which implements AutomaticKeepAliveClientMixin:
|
@mmahkamov Looks like this doesn't work for me. The Banner ad still keeps reloading while popping view. |
@mmahkamov I tried your method above, it seems the reloading doesn't stop although a new error appeared:
(using the test banner ad) also, I called the widget like so:
|
Are you using FutureBuilder by any chance? |
This fix didn't work for me and I'm not using FutureBuilder too. Please help :( |
no working! Any solution? in every refresh of the list it shows blank blink which not looks good. and is there any way to preload the banner and show only if it's loaded?? |
The blink is happening because the background color of the native widget is white by default. You need to patch the native side to make the host view transparent. |
Can you share the code? How can do that? |
I changed the container color to white as my screen background is white but the ad container still displays black color. |
same here |
You can get the idea from the following patch or just
|
Can you please elaborate on the steps for applying this as patch. Thanks. |
I second this. please help us bro... thanks a lot |
Has anyone in this thread considered doing something like this? #61 (comment) |
That is a nice workaround. But I'd rather use firebase_admob for that. |
@kestasb Where you able to get a work around for this issue? |
Any update/fix for this issue? it is one thing that is holding me back from the new release :( |
Doesn't work for me.It gets reloaded everytime setState is called. :( |
this didn't work for me |
This quite important error has more than a year now |
I am not sure if I've made a solution to this, but it kinda worked for me. I made changed to this long back and I don't really have a track on them. I've also changed channel names and it's done on fork of a previous version of this lib. It might not contain features available in the newer version. I've added this to my repo. If someone could check and see if this works. https://github.com/sumitgohil/flutter_admob_plugin |
@sumitgohil @erperejildo It is in the package but hasn't been updated in the pub.dev Use this for now:
|
I can confirm this, it works. Let's see when this gets merged |
Banner is reloaded with each Navigator push()/pop(), both onBannerCreated and AdmobAdEvent.loaded are called even the banner is a child of a const StalessWidget, whose build() method isn't called.
Admob guidelines does not recommend to refresh banner manually.
Is it possible to avoid this behaviour?
The text was updated successfully, but these errors were encountered: