unwrapOrElse method
Returns result.val
if result
is Ok
.
Returns call of elseFunc(result.err)
if result
is Err
.
Implementation
T unwrapOrElse(T Function(Error? e) elseFunc) {
if (isErr) {
return elseFunc(err);
}
return val!;
}
Returns result.val
if result
is Ok
.
Returns call of elseFunc(result.err)
if result
is Err
.
T unwrapOrElse(T Function(Error? e) elseFunc) {
if (isErr) {
return elseFunc(err);
}
return val!;
}