unwrapOrOption method
Converts a Result into an Option, returning Some
if the Result is Ok, and _None
if the Result is Err.
Note: This should not be used to determine is Ok or is Err, since when the success type is nullable, a
null is ambiguous in meaning.
Implementation
@override
@pragma("vm:prefer-inline")
Some<S> unwrapOrOption() => Some(ok);