Optional.of

Constructs an optional value using a given value.

  1. Optional!T of(T value)
    struct Optional(T)
    static
    of
    ()
  2. Optional!T of(Nullable!T nullableValue)

Parameters

value T

The value to use.

Return Value

Type: Optional!T

An optional that contains the given value.