Result<T> class

Result Used to store a result that can be tested for pass or fail, and if failed provide an error explanation

Constructors

Result.failure(String? error)
failuer
Result.success(T? value)
success

Properties

error String?
a string description of the error
final
failed bool
a helper failed instead of explicityly testing for !ok
no setter
hashCode int
The hash code for this object.
no setterinherited
ok bool
a boolean indicated whether the result is ok
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T?
a result of any type
final

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