Result<A, E> class final

Good enough for my use cases hahaha

a basic type that operates similar on java's optional type which allows for a more explicit and strongly typed value rather than just a nullable type (Type?)

Constructors

Result.bad(E message)
bad job >:(
factory
Result.good(A payload, E message)
good job :D
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isBad bool
no setter
isGood bool
no setter
message → E
final
payload → A
no setter
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
onBad(void consumer(E message)) → void
onGood(void consumer(A? payload, E message)) → void
toString() String
A string representation of this object.
inherited

Operators

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