Optional<T>.fromNullable constructor

const Optional<T>.fromNullable(T value)

Constructs an Optional of the given value.

If value is null, returns absent().

Implementation

const Optional.fromNullable(T value) : this._value = value;