Why doesn't the Admob Banner class have a dispose method?
hkndzdr opened this issue · comments
Hakan Dizdar commented
Why doesn't the Admob Banner class have a dispose method?
Kevin McGill commented
Adding this to README FAQ.
Technically the banner class is using PlatformView
which handles disposing the view for you.
onBannerCreated: (AdmobBannerController controller) {
// Dispose is called automatically for you when Flutter removes the banner from the widget tree.
// Normally you don't need to worry about disposing this yourself, it's handled.
// If you need direct access to dispose, this is your guy!
controller.dispose();
},
Yusril Rapsanjani commented
();
@kmcgill88
I check using devtools, when using controller dispose, the banner still showed in memory.
The controller and banner is already to dispose after widget close