'Flutter app performance with Admob ad banner
I just wanted to ask you, if Google's Admob plugin in flutter doesnt affect app performance, because on my virtual device, it gets kind of laggy after I implement my ad banner.
They are updating automatically on the background and I dont know, if they are not stacked on top of each other or something like that.
Here is my code:
@override
void initState() {
FirebaseAdMob.instance.initialize(appId: "ca-app-pub-...");
targetingInfo = MobileAdTargetingInfo(
nonPersonalizedAds: false,
);
banner = BannerAd(
adUnitId: "ca-app-pub-...",
size: AdSize.banner,
targetingInfo: targetingInfo,
listener: (MobileAdEvent event) {
print("BannerAd event is $event");
},
);
banner
..load()
..show(
anchorOffset: 0.0,
horizontalCenterOffset: 10.0,
anchorType: AnchorType.top,
);
super.initState();
}
@override
void dispose() {
banner.dispose();
super.dispose();
}
Thanks for your suggestions.
Solution 1:[1]
App performance getting low with AdMob check this: github
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mohammad Enawe |
