FakeNativeHandle class

A drivable fake native handle. buildWidget returns a fixed-size SizedBox so widget tests can pump it without platform views.

Implemented types

Constructors

FakeNativeHandle(String adUnitId)
Creates a fake native handle.

Properties

adUnitId String
The ad unit this ad was loaded for.
final
buildWidgetCalls int
Number of buildWidget calls.
getter/setter pair
disposed bool
Whether dispose has been called.
getter/setter pair
events Stream<ViewAdEvent>
Open/close/impression/click events for this ad.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
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. Refreshed by AdMob's server-side auto-refresh as the winning source changes.
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

Methods

buildWidget() Widget
Builds the widget that renders this ad (an AdWidget in production, a plain placeholder in tests). Host it exactly once.
override
dispose() Future<void>
Releases the underlying platform ad.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
simulateEvent(ViewAdEvent event) → void
Emits a view-ad event.
simulatePaid(AdPaidEvent event) → void
Emits a paid event.
toString() String
A string representation of this object.
inherited

Operators

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