unwrapOrElse method
Returns the encapsulated value if this instance represents Ok
or the result of onError
function for
the encapsulated a Err value.
Note: This should not be used to determine is Ok or is Err, since when the success type is nullable,
the value returned can be null, which is ambiguous in meaning.
Implementation
@override
S unwrapOrElse(S Function(F error) onError) {
return onError(err);
}