Value<T> class
abstract
Holds a value that is useful for copying. Consumers can call valueOr to get the internal value, or the original value if there is no internal value.
Using Value.none will always return the original value provided.
Using Value.of will always return the new value provided. This is true
even if the type is nullable and the value is null.
Constructors
- Value.none()
-
constfactory
- Value.of(T value)
-
constfactory
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
valueOr(
T originalValue) → T
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited