UseCase<T> class sealed

The result of running a use case: either a UseCaseSuccess holding T, or a UseCaseFailure holding a UseCaseException.

Implementers

Properties

exception UseCaseException
The failure exception. Throws StateError on a success.
no setter
failed bool
True if this is a UseCaseFailure.
no setter
hashCode int
The hash code for this object.
no setterinherited
result → T
The success value. Throws StateError on a failure.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
succeeded bool
True if this is a UseCaseSuccess.
no setter

Methods

fold<R>(R onFailure(UseCaseException exception), R onSuccess(T value)) → R
Folds both branches into a single value.
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