Optional<T>.fromNullable constructor

const Optional<T>.fromNullable(
  1. T? value
)

Constructs an Optional of the given value.

If value is null, returns absent().

Implementation

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