Outcome<T extends Object> class
sealed
The foundational sealed class for all Outcome types like Option, Result and Resolvable.
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< , provided by the MapOutcomeExt10 extensionOutcome< >Outcome< >Outcome< >Outcome< >Outcome< >Outcome< >Outcome< >Outcome< >Object> > -
map2<
R extends Object> (R mapper(T)) → TResolvableOption< Object> -
Available on Outcome<
Outcome< , provided by the MapOutcomeExt2 extensionObject> > -
map3<
R extends Object> (R mapper(T)) → TResolvableOption< Object> -
Available on Outcome<
Outcome< , provided by the MapOutcomeExt3 extensionOutcome< >Object> > -
map4<
R extends Object> (R mapper(T)) → TResolvableOption< Object> -
Available on Outcome<
Outcome< , provided by the MapOutcomeExt4 extensionOutcome< >Outcome< >Object> > -
map5<
R extends Object> (R mapper(T)) → TResolvableOption< Object> -
Available on Outcome<
Outcome< , provided by the MapOutcomeExt5 extensionOutcome< >Outcome< >Outcome< >Object> > -
map6<
R extends Object> (R mapper(T)) → TResolvableOption< Object> -
Available on Outcome<
Outcome< , provided by the MapOutcomeExt6 extensionOutcome< >Outcome< >Outcome< >Outcome< >Object> > -
map7<
R extends Object> (R mapper(T)) → TResolvableOption< Object> -
Available on Outcome<
Outcome< , provided by the MapOutcomeExt7 extensionOutcome< >Outcome< >Outcome< >Outcome< >Outcome< >Object> > -
map8<
R extends Object> (R mapper(T)) → TResolvableOption< Object> -
Available on Outcome<
Outcome< , provided by the MapOutcomeExt8 extensionOutcome< >Outcome< >Outcome< >Outcome< >Outcome< >Outcome< >Object> > -
map9<
R extends Object> (R mapper(T)) → TResolvableOption< Object> -
Available on Outcome<
Outcome< , provided by the MapOutcomeExt9 extensionOutcome< >Outcome< >Outcome< >Outcome< >Outcome< >Outcome< >Outcome< >Object> > -
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
toR
. -
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