onSuccess method
Executes the given function with the success value if this is a success
Implementation
Result<T, E> onSuccess(void Function(T) action) {
if (this case Success(value: final value)) {
action(value);
}
return this;
}
Executes the given function with the success value if this is a success
Result<T, E> onSuccess(void Function(T) action) {
if (this case Success(value: final value)) {
action(value);
}
return this;
}