P Mahto
P Mahto

Reputation: 25

Why admob_flutter takes space on screen when there is no ads?

I am using admob_flutter package for banner , but my issue is ,when app is offline or there is no ads , ad space is always their like this screenshot. How can I solve this ?

Image1

and this is after ad showing

Image2

Upvotes: 0

Views: 221

Answers (1)

Huzaifa Ahmed
Huzaifa Ahmed

Reputation: 323

You can try conditional rendering like:

isShowAd ? AdBanner() : const SizedBox.shrink()

SizedBox.shrink() will not take extra space if there is no ad

Upvotes: 1

Related Questions