result/result library

Classes

BaseError
BaseError defines the Error interface, which can be used to implement custom error types.
BaseResult<T, E>
BaseResult holds a value of type T or an error of type E.
Either<L, R>
Either can be used to return a result in an either, or style.
Error
Error is the standard error class using a string as the underlaying type.
Option<T>
Option is used as a result that represents some value or none.
Result<T>

Enums

OptionState
OptionState is some or none. It represents the state of an Opion.
ResultState

Functions

isError(dynamic v) bool
isError returns true is v is a type of error.
isErrorType<T extends BaseError>(dynamic v) bool
isErrorType returns true if v is of error type T.