Option<T> class

Classe che permette di gestire un valore o la sua assenza

Implementers

Constructors

Option.none()
const
Option.some(T? _value)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isSome bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asIterable() Iterable<T>
bind<R>(Option<R> f(T t)) Option<R>
flatMap<R>(Iterable<R> f(T t)) Iterable<R>
fold<R>(R none(), R some(T some)) → R
foreach(void f(T t)) Option<void>
getOrElse(T defaultVal) → T
getOrElseBind(Option<T> f()) Option<T>
getOrElseDo(T fallback()) → T
getOrElseMap(T f()) Option<T>
map<R>(R f(T t)) Option<R>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toFuture() Future<Option<T>>
toFutureOrElse(Future<Option<T>> future) Future<Option<T>>
toFutureOrElseDo(Future<Option<T>> futureF()) Future<Option<T>>
toString() String
A string representation of this object.
inherited
toValidation() Validation<Option<T>>
where(bool f(T t)) Option<T>

Operators

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