None<T> class
final
Variant representing a missing value.
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → bool
-
Returns true if this is a None instance.
no setterinherited
- isPresent → bool
-
Returns true if this is a Some instance.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
flatMap<
R> (Optional< R> mapper(T value)) → Optional<R> -
Transforms the value using a function that returns an Optional.
Prevents nested structures like
Optional<Optional<T>>.inherited -
map<
R> (R mapper(T value)) → Optional< R> -
Transforms the value if present using
mapper.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
valueOr(
T fallback) → T -
Returns the value if present, otherwise returns
fallback.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override