Value<T>.absentIfNull constructor
const
Value<T>.absentIfNull (
- T? value
Create a value that is absent if value
is null
and present if it's
not.
The functionality is equiavalent to the following:
x != null ? Value(x) : Value.absent()
.
Implementation
const Value.absentIfNull(T? value)
: _value = value,
present = value != null;