Either<T, R> class

Either wrapper containing one of T or R.

Constructors

Either({T? ok, R? nok})
Construct a new instance.
const
Either.nok(R nok)
Construct a new instance with value R nok,
factory
Either.ok(T ok)
Construct a new instance with value T ok,
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isOk bool
Returns true if ok is NOT null.
no setter
nok → R?
The not-so-OK result of type R.
final
ok → T?
The OK result of type T.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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