Option<T> class sealed

Implementers

Properties

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

Methods

and<U>(Option<U> other) Option<U>
andThen<U>(Option<U> toOption(T)) Option<U>
copy() Option<T>
expect(String message) → T
filter(bool predicate(T)) Option<T>
inspect(void onSome(T)) Option<T>
isNoneOr(bool test(T)) bool
isSomeAnd(bool test(T)) bool
map<U>(U toValue(T)) Option<U>
mapOr<U>(U defaultValue, U toValue(T)) → U
mapOrElse<U>(U onNone(), U toValue(T)) → U
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
okOr<E extends Exception>(E err) Result<T, E>
okOrElse<E extends Exception>(E onNone()) Result<T, E>
or(Option<T> other) Option<T>
orElse(Option<T> onNone()) Option<T>
toString() String
A string representation of this object.
inherited
unwrap() → T
unwrapOr(T defaultValue) → T
unwrapOrElse(T onNone()) → T
xor(Option<T> other) Option<T>
zip<U>(Option<U> other) Option<(T, U)>

Operators

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