AppOpenAdManager class

The single owner of app-open behaviour (v1 trap: two reactors coordinated through statics fought each other — the facade creates exactly one manager and nothing else reacts to foreground).

Two legitimate product moments:

  • Resume — a genuine background→foreground return, driven by the seam's foreground events (backed by AppStateEventNotifier, the only correct signal; iOS inactive is NOT backgrounding). On by default (AppOpenConfig.showOnResume); all policy is delegated to the controller and gate: consent, enabled, frequency caps, coordinator suppression, expiry.
  • Launch — a real cold process launch, taken explicitly with showAtLaunch from the app's loading screen. NOT faked from a lifecycle event (AppStateEventNotifier never replays the cold-launch foreground), and one-shot per process.

Invariant 3 ("never show on a cold launch by surprise") holds structurally on the resume path: at a real cold launch nothing is loaded yet, so show() finds no warm ad. The launch path is opt-in.

Constructors

AppOpenAdManager({required AppOpenAdController controller, required AdSdk sdk, required AppOpenConfig config, FullScreenAdCoordinator? coordinator, Duration postDismissSuppression = const Duration(seconds: 1), DateTime now()?})
Creates the manager. Call start to begin reacting to foreground returns.

Properties

controller → AppOpenAdController
The app-open slot's controller (state, readiness, block reasons).
no setter
hashCode → int
The hash code for this object.
no setterinherited
isStarted → bool
Whether the manager is currently reacting to foreground events.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Stops the manager. Does NOT dispose the controller (the facade owns controller lifecycles).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showAtLaunch({Duration maxWait = const Duration(seconds: 3)}) → Future<AdShowResult>
Takes the one-shot cold-launch opportunity: shows an app-open ad while the app's loading screen is up, and completes when the ad has CLOSED — keep the loading screen until then, then enter the app (6.0).
start() → void
Starts listening and warms the first preload. Idempotent.
stop() → void
Stops reacting to foreground events (the controller keeps its ad).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited