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
- 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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → AdDimensions
-
The resolved on-screen size, known once loaded.
final
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.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited