Skip to content

v5.1.1 — collapse disabled ad surfaces and correct adaptive placeholders

Choose a tag to compare

@faizahmaddae faizahmaddae released this 21 Jul 03:03
· 6 commits to main since this release
991b650

A focused, backward-compatible ad-surface layout bug fix prompted by real emulator screenshots.

  • Remove-Ads now immediately collapses Banner and Native surfaces to zero. Widget-first mode collapses synchronously on disableAds(); advanced controller mode on AdBlocked(adsDisabled).
  • The example also removes parent SafeArea / Card surfaces when ads are disabled (not just the ad inside them).
  • Anchored adaptive uses a 50dp pre-load floor and then the exact loaded dimensions.
  • Inline adaptive defaults to zero before load.
  • Fixed and loaded sizing remain exact.
  • placeholderHeight remains supported, but adsDisabled always overrides it (zero footprint).
  • Re-enabling ads reloads normally, with no duplicate requests.
  • No public API change and no migration required.

Verification: dart format/analyze clean, 537 tests green, coverage 87.3%, pana 160/160, publish dry-run 0 warnings. Android runtime was verified on an emulator with Google test ads (enabled / disabled / re-enabled); the iOS simulator build passed (iOS was not interactively runtime-tested).