onErr method
Calls f(result.err) with side effect if this result is Err. Anyway returns this result as is.
Implementation
Future<Result<T>> onErr(Function(Error) f) {
return then((resultT) {
if (resultT.isErr) {
f(resultT.err!);
}
return this;
});
}