Optional<T>.of constructor
Optional<T>.of (
- T value
Constructs an Optional of the given value
.
Throws ArgumentError if value
is null.
Implementation
Optional.of(T value) : _value = value {
// TODO(cbracken): Delete and make this ctor const once mixed-mode
// execution is no longer around.
ArgumentError.checkNotNull(value);
}