onOk method
Calls f(result.val) with side effect if this result is Ok. Anyway returns this result as is.
Implementation
Result<T> onOk(Function(T) f) {
if (isOk) {
f(val!);
}
return this;
}
Calls f(result.val) with side effect if this result is Ok. Anyway returns this result as is.
Result<T> onOk(Function(T) f) {
if (isOk) {
f(val!);
}
return this;
}