Optional<V> class
- Annotations
Constructors
- Optional({V? value})
-
const
- Optional.none()
-
const
- Optional.some(V value)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cast<
R> () → Optional< R> -
factory<
R> (FunctionFactory< V?, R> func) → Optional<R> -
factoryGet<
R> (FunctionFactory< V, R> func) → Optional<R> -
factoryIfGet<
R> (FunctionFactory< V, R> func) → Optional<R> -
get(
) → V -
ifNull<
R> (FunctionFactory< V, R> function) → R? -
ifSome<
R> (FunctionFactory< V, R> function) → R? -
isNull(
) → bool -
isSome(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orElse(
V defaultValue) → V -
orElseGet(
FunctionCallback< V> other) → V -
toString(
) → String -
A string representation of this object.
inherited
-
transform(
Transformer< V> func) → Optional<V>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited