callWithLoadingAndRetry<T> function

Future<T> callWithLoadingAndRetry<T>(
  1. Future<T> fn(), {
  2. void onError(
    1. dynamic error
    )?,
  3. int? timeoutBeforeLoadingMill,
  4. int? maxAttempts,
})

Implementation

Future<T> callWithLoadingAndRetry<T>(
  Future<T> Function() fn, {
  void Function(dynamic error)? onError,
  int? timeoutBeforeLoadingMill,
  int? maxAttempts,
}) async {
  return await callWithLoadingAfterTimeout(
    () => retryIt(fn, maxAttempts: maxAttempts),
    onError: onError,
    timeoutBeforeLoadingMill: timeoutBeforeLoadingMill,
  );
}