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