AdCallbacks class
Lifecycle events of a single ad request. Every callback is optional.
A show that ends normally reports onClosed exactly once. A reward ad reports either onRewardEarned or onRewardSkipped before onClosed.
Constructors
- AdCallbacks({VoidCallback? onLoaded, void onLoadFailed(AdFailure failure)?, VoidCallback? onShown, void onShowFailed(AdFailure failure)?, VoidCallback? onRewardEarned, VoidCallback? onRewardSkipped, VoidCallback? onClosed})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onClosed → VoidCallback?
-
final
- onLoaded → VoidCallback?
-
final
- onLoadFailed → void Function(AdFailure failure)?
-
final
- onRewardEarned → VoidCallback?
-
final
- onRewardSkipped → VoidCallback?
-
final
- onShowFailed → void Function(AdFailure failure)?
-
final
- onShown → VoidCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{VoidCallback? onLoaded, void onLoadFailed(AdFailure failure)?, VoidCallback? onShown, void onShowFailed(AdFailure failure)?, VoidCallback? onRewardEarned, VoidCallback? onRewardSkipped, VoidCallback? onClosed}) → AdCallbacks - Copy with the given callbacks replaced. A null argument keeps the existing callback; it cannot be used to clear one.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited