Failure<T> class

Failed result containing an error.

Inheritance
Available extensions

Constructors

Failure(FKernalError error)
const

Properties

data → T

Available on Result<T>, provided by the ResultExtension extension

Gets the data if Success, throws if Failure.
no setter
error FKernalError
final
error FKernalError

Available on Result<T>, provided by the ResultExtension extension

Gets the error if Failure, throws if Success.
no setter
hashCode int
The hash code for this object.
no setterinherited
isFailure bool

Available on Result<T>, provided by the ResultExtension extension

Returns true if this is a Failure.
no setter
isSuccess bool

Available on Result<T>, provided by the ResultExtension extension

Returns true if this is a Success.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fold<R>(R onFailure(FKernalError), R onSuccess(T)) → R

Available on Result<T>, provided by the ResultExtension extension

Folds the result to a single value.
map<R>(R mapper(T)) Result<R>

Available on Result<T>, provided by the ResultExtension extension

Maps the success value to a new type.
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