onSuccess method
Performs the given action on the encapsulated value if this instance represents success. Returns the original Result unchanged.
Implementation
@override
Result<S, F> onSuccess(void Function(S success) onSuccess) {
onSuccess(_success);
return this;
}