Option<T>.from constructor
Option<T>.from (
- T? value
Creates an Option
from the given nullable T
value.
Creates:
Implementation
factory Option.from(T? value) => switch (value) {
null => None(),
_ => Some(value)
};