FallbackStrategyOptions<T> class

Configuration options for the fallback strategy.

Constructors

FallbackStrategyOptions.new({required FallbackAction<T> fallbackAction, ShouldHandlePredicate<T>? shouldHandle, OnFallbackCallback<T>? onFallback})
Creates fallback strategy options.
const
FallbackStrategyOptions.withValue(T fallbackValue, {ShouldHandlePredicate<T>? shouldHandle, OnFallbackCallback<T>? onFallback})
Creates fallback strategy options with a static fallback value.

Properties

fallbackAction FallbackAction<T>
The fallback action to execute when the primary action fails.
final
hashCode int
The hash code for this object.
no setterinherited
onFallback OnFallbackCallback<T>?
Callback invoked when fallback is triggered.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldHandle ShouldHandlePredicate<T>?
Predicate to determine which outcomes should trigger fallback.
final

Methods

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