FakeBannerHandle class
A drivable fake banner handle. buildWidget returns a SizedBox of size so widget tests can pump it without platform views.
- Implemented types
Constructors
- FakeBannerHandle(String adUnitId, {AdDimensions size = const AdDimensions(width: 320, height: 50), bool isCollapsible = false})
- Creates a fake banner handle.
Properties
- adUnitId → String
-
The ad unit this ad was loaded for.
final
- buildWidgetCalls ↔ int
-
Number of buildWidget calls.
getter/setter pair
-
dimensions
→ ValueListenable<
AdDimensions> -
Reactive view of size.
no setteroverride
- 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
- isCollapsible → bool
-
Whether the loaded ad is a collapsible banner.
final
-
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
- size → AdDimensions
-
The resolved on-screen size, known once loaded.
no setteroverride
Methods
-
buildWidget(
) → Widget -
Builds the widget that renders this ad (an
AdWidgetin 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.
-
simulateResize(
AdDimensions size) → void - Simulates the platform resolving a new size for the SAME live ad — what an AdMob server-side auto-refresh of an inline adaptive banner does (the real seam updates the handle and notifies listeners).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited