onSuccess abstract method

Result<S, F> onSuccess(
  1. void onSuccess(
    1. S success
    )
)

Performs the given action on the encapsulated value if this instance represents success. Returns the original Result unchanged.

Implementation

Result<S, F> onSuccess(
  void Function(S success) onSuccess,
);