Called if onPressed throws. If null, the error is rethrown once the loading state has been cleared.
final FutureOr<void> Function()? onError;