FxResult<T> class
sealed
- Available extensions
- Annotations
-
- @freezed
Constructors
- FxResult.failure(FxError error)
-
constfactory
- FxResult.success(T data)
-
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> ({required TResult success(FxSuccess< T> value), required TResult failure(FxFailure<T> value)}) → TResult -
Available on FxResult<
AT> , provided by the FxResultPatterns extensionswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? success(FxSuccess< T> value)?, TResult? failure(FxFailure<T> value)?}) → TResult? -
Available on FxResult<
A variant ofT> , provided by the FxResultPatterns extensionmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult success(FxSuccess< T> value)?, TResult failure(FxFailure<T> value)?, required TResult orElse()}) → TResult -
Available on FxResult<
A variant ofT> , provided by the FxResultPatterns extensionmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult success(T data)?, TResult failure(FxError error)?, required TResult orElse()}) → TResult -
Available on FxResult<
A variant ofT> , provided by the FxResultPatterns extensionwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult success(T data), required TResult failure(FxError error)}) → TResult -
Available on FxResult<
AT> , provided by the FxResultPatterns extensionswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? success(T data)?, TResult? failure(FxError error)?}) → TResult? -
Available on FxResult<
A variant ofT> , provided by the FxResultPatterns extensionwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited