Execute whenSuccess if the Result is a success.
whenSuccess
@override R? onSuccess<R>(R Function(S success) whenSuccess) => null;