UseCaseFailure<T> class final

A failed use case carrying a UseCaseException.

Inheritance

Constructors

UseCaseFailure(UseCaseException value)
const

Properties

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

Methods

fold<R>(R onFailure(UseCaseException exception), R onSuccess(T value)) → R
Folds both branches into a single value.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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