v5.1.0 — App Open launch modes and focused reliability hardening
A focused reliability + App Open UX minor. Additive and backward-compatible — every 5.0 call site compiles unchanged, and the default App Open behavior is preserved.
App Open trigger modes
AppOpenConfig.triggerMode selects AppOpenTriggerMode:
resumeOnly— the default, exactly the v5.0 behavior (show on a genuine warm return only).launchOnly— show only at cold launch, viashowAtLaunchIfReady().launchAndResume— both.
showAtLaunchIfReady()
Call it from your real loading screen, right before entering main content. It returns immediately and never waits for an ad, the SDK, consent, or the network — it shows only when an eligible ad is already ready, otherwise returns false at once and your app proceeds. It is one-shot per process launch, so a false result never turns into a surprise App Open later. Cold-launch App Open is best-effort, not guaranteed — it appears only if an ad happened to be ready.
Also in this release
- launch-only inventory retirement — after its single launch,
launchOnlystops maintaining an ad it can never show again. - Native-ad expiry —
NativeConfig.maxAdAge(safe default 55 min;nulldisables); stale native inventory is dropped and reloaded through the normal gate. - Runtime SSV readiness fix — a rewarded / rewarded-interstitial ad is never ready or showable until the latest SSV payload has settled (finalized before
AdLoaded; concurrent updates generation-serialized). - Callback / lifecycle containment —
AppStateEventNotifier.startListening()rejection contained;enableAds()/disableAds()and the App Open manager are inert afterdispose(). - Backward compatibility —
FullScreenAdControllerBase.onLoaded()unchanged;resumeOnlydefault unchanged. - Docs & example — README/MIGRATION/CHANGELOG reconciled; the example gains a real launch/loading screen demonstrating the launch path without an artificial delay.
See the CHANGELOG and MIGRATION. Live on pub.dev: https://pub.dev/packages/ad_flow/versions/5.1.0