Err<T, E> class

Inheritance

Constructors

Err(E error)
const

Properties

error → E
final
hashCode int
The hash code for this object.
no setterinherited
isError bool
no setterinherited
isSuccess bool
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({E? error}) Err<T, E>
flatMap<U>(Result<U, E> transform(T value)) Result<U, E>
Chains another Result-returning operation (monadic flatMap)
inherited
fold<R>(R onSuccess(T value), R onError(E error)) → R
Returns onSuccess if Ok, otherwise onError
override
map<U>(U transform(T value)) Result<U, E>
Transforms the success value
inherited
mapError<F>(F transform(E error)) Result<T, F>
Transforms the error
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<R>({required R ok(T value), required R err(E error)}) → R
Pattern matching
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited