FakeFullScreenAdHandle class
A drivable fake full-screen ad handle.
Implements every full-screen handle interface so one fake serves all four formats.
- Implemented types
Constructors
- FakeFullScreenAdHandle(String adUnitId)
-
Creates a fake handle for
adUnitId.
Properties
- adUnitId → String
-
The ad unit this ad was loaded for.
final
- autoEmitShowed ↔ bool
-
Whether show automatically emits AdShowedEvent (default true). Turn
off to drive the showed event manually.
getter/setter pair
-
contentEvents
→ Stream<
FullScreenAdEvent> -
Show/dismiss/impression/click events for this ad.
no setteroverride
- disposed ↔ bool
-
Whether dispose has been called.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastOnUserEarnedReward ↔ OnUserEarnedReward?
-
The reward callback passed to the most recent show.
getter/setter pair
-
paidEvents
→ Stream<
AdPaidEvent> -
Impression-level revenue events (allowlisted accounts only).
no setteroverride
- response → AdResponseSummary?
-
Which network filled this ad (mediation observability), or null when
the SDK reported nothing.
no setteroverride
- responseSummary ↔ AdResponseSummary?
-
What response reports (settable to simulate mediation fill info).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showCalls ↔ int
-
Number of show calls (an SDK-faithful controller never exceeds 1).
getter/setter pair
- showError ↔ AdFlowError?
-
If set, show emits AdFailedToShowEvent with this error instead of
AdShowedEvent.
getter/setter pair
- showRejectsWith ↔ Object?
-
If set, show throws this instead of completing normally — simulates
the real plugin's
Ad.show()Future rejecting (ad already released, channel error, mediation failure), which the documentedAdSdk.showcontract says should never happen (failures are meant to arrive via AdFailedToShowEvent on contentEvents instead) but a real implementation can still violate. Controllers must be robust to this regardless of what the contract promises.getter/setter pair - ssvUpdateError ↔ Object?
-
If set, updateServerSideVerification throws this.
getter/setter pair
-
ssvUpdateHold
↔ Completer<
void> ? -
If set, updateServerSideVerification awaits this before recording —
leave it incomplete to hold an attach in flight (e.g. to dispose the
controller mid-attach and prove no crash / no stale install).
getter/setter pair
-
ssvUpdates
→ List<
ServerSideVerification> -
SSV payloads applied via updateServerSideVerification, in order.
final
Methods
-
dispose(
) → Future< void> -
Releases the underlying platform ad.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
{OnUserEarnedReward? onUserEarnedReward}) → Future< void> -
Shows the ad. Show failures are reported via contentEvents as
AdFailedToShowEvent, mirroring the underlying SDK.
override
-
simulateClicked(
) → void - Emits AdClickedEvent.
-
simulateDismissed(
) → void - Emits AdDismissedEvent. Throws StateError if show was never called — the real SDK never dismisses an ad that was never shown.
-
simulateImpression(
) → void -
simulatePaid(
AdPaidEvent event) → void - Emits a paid event.
-
simulateReward(
RewardEarned reward) → void - Invokes the reward callback captured by show. Throws StateError if the ad has already been dismissed — a reward can't arrive after the ad's lifecycle has ended.
-
simulateShowed(
) → void - Emits AdShowedEvent (for tests with autoEmitShowed off).
-
simulateShowFailed(
AdFlowError error) → void - Emits AdImpressionEvent. Emits AdFailedToShowEvent directly — e.g. a mid-display failure AFTER the ad already showed (use showError for one that fails the show dispatch itself).
-
toString(
) → String -
A string representation of this object.
inherited
-
updateServerSideVerification(
ServerSideVerification ssv) → Future< void> -
Applies (or replaces) server-side verification options on this
already-loaded ad — call any time before
show().override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited