Open d-apps opened 4 years ago
This is probably the issue. https://github.com/kmcgill88/admob_flutter/issues/46. The SMART_BANNER
enum is misleading since you have to wrap it in a container and set the size. A PR would be great to document how the current use of this works! 😄
@kmcgill88 I don't think that worked.
@override
Widget build(BuildContext context) {
Color backgroundColor = Theme.of(context).backgroundColor;
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Container(
width: double.infinity,
height: 75,
decoration: BoxDecoration(color: backgroundColor),
child: AdmobBanner(
adUnitId: _bannerUnitId,
adSize: AdmobBannerSize.SMART_BANNER,
),
),
),
);
}
also tried solid numbers for width, same result or a blank container.
2 tests here with smartBanner (wrong) and mediumRectangle (correct):
The container is responsive because it takes 100% of its parent width but the ad itself isn't
Was this fixed? the smart banner is acting the same on android
When I set adSize: AdmobBannerSize.SMART_BANNER:
Other Banner types like BANNER is ok:
adSize: AdmobBannerSize.BANNER
Looks like there's something wrong with SMART_BANNER and it's height and width. I'm using BANNER instead but could you take a look at this?
This is not something about Admob because when I use SMART_BANNER with the official plugin firebase_admob, the banner is showed correctly.