toOptional property

Optional<T> get toOptional

Returns an Optional with this as its value

Implementation

Optional<T> get toOptional => Optional.of(this);