retry method

Future<void> retry()

Implementation

Future<void> retry() async {
  final metadata = metadataFor(label);
  // look up callbacks (or provide defaults)
  final fns = adapter.ref.read(_offlineCallbackProvider)[metadata] ??
      [
        [null, null]
      ];

  for (final pair in fns) {
    await adapter.sendRequest<T>(
      uri,
      method: method,
      headers: headers,
      label: label,
      body: body,
      onSuccess: pair.first as _OnSuccessGeneric<T>?,
      onError: pair.last as _OnErrorGeneric<T>?,
    );
  }
}