onOk method

Result<T> onOk(
  1. dynamic f(
    1. T
    )
)

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;
}