Outcome<T extends Object> class sealed

The foundational sealed class for all Outcome types like Option, Result and Resolvable.

Available extensions

Properties

hashCode int
The hash code for this object.
no setterinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setter
value FutureOr<Object>
final

Methods

end() FutureOr<void>
Suppresses the linter error must_use_outcome.
map<R extends Object>(R noFutures(T value)) Outcome<R>
Transforms the contained value using the mapper function noFutures while preserving the Outcome's structure.
map10<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Object>>>>>>>>>>, provided by the MapOutcomeExt10 extension

map2<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Object>>, provided by the MapOutcomeExt2 extension

map3<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Outcome<Object>>>, provided by the MapOutcomeExt3 extension

map4<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Outcome<Outcome<Object>>>>, provided by the MapOutcomeExt4 extension

map5<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Outcome<Outcome<Outcome<Object>>>>>, provided by the MapOutcomeExt5 extension

map6<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Object>>>>>>, provided by the MapOutcomeExt6 extension

map7<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Object>>>>>>>, provided by the MapOutcomeExt7 extension

map8<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Object>>>>>>>>, provided by the MapOutcomeExt8 extension

map9<R extends Object>(R mapper(T)) TResolvableOption<Object>

Available on Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Outcome<Object>>>>>>>>>, provided by the MapOutcomeExt9 extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
raw({required FutureOr<Object> onErr(Err<Object> err), required FutureOr<Object> onNone()}) FutureOr<Object>
The low-level primitive for reducing a Outcome chain. It recursively unwraps all Outcome layers to return the innermost raw value, forcing the caller to handle terminal states via callbacks.
rawAsync() Async<Object>
Reduces any Outcome chain to a single Async.
rawSync() Sync<Object>
Safely reduces any Outcome chain to a single Sync.
reduce<R extends Object>() TResolvableOption<R>
Reduces any nested Outcome structure into a single TResolvableOption.
toString() String
A string representation of this object.
inherited
toUnit() Outcome<Unit>

Available on Outcome<Object>, provided by the ToUnitOnObjectOutcome extension

toVoid() Outcome<void>

Available on Outcome<T>, provided by the ToVoidOnOutcomeExt extension

transf<R extends Object>([R noFutures(T e)?]) Outcome<Object>
Transforms the Outcome's generic type from T to R.
unwrap() FutureOr<T>
Strongly discouraged: Unsafely returns the contained value.
unwrapOr(T fallback) FutureOr<T>
Returns the contained value, or the fallback if the Outcome is in an Err or None state.
wrapInAsync() Async<M>

Available on M, provided by the WrapOnOutcomeExt extension

wrapInOk() Ok<M>

Available on M, provided by the WrapOnOutcomeExt extension

wrapInResolvable() Resolvable<M>

Available on M, provided by the WrapOnOutcomeExt extension

wrapInSome() Some<M>

Available on M, provided by the WrapOnOutcomeExt extension

wrapInSync() Sync<M>

Available on M, provided by the WrapOnOutcomeExt extension

wrapValueInAsync() Outcome<Async<T>>

Available on M, provided by the WrapOnOutcomeExt extension

wrapValueInOk() Outcome<Ok<T>>

Available on M, provided by the WrapOnOutcomeExt extension

wrapValueInResolvable() Outcome<Resolvable<T>>

Available on M, provided by the WrapOnOutcomeExt extension

wrapValueInSome() Outcome<Some<T>>

Available on M, provided by the WrapOnOutcomeExt extension

wrapValueInSync() Outcome<Sync<T>>

Available on M, provided by the WrapOnOutcomeExt extension

Operators

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