durable_queue_transfer library

Uploads and downloads for durable_queue that continue while the app is in the background or closed, run by background_downloader.

Classes

BackgroundRequest
A stored HTTP request that the operating system sends, so it goes out even after the app is minimised or closed.
QueueTransfers
Runs uploads and downloads for a DurableQueue through background_downloader, so they continue while the app is in the background or closed.
TransferResult
The outcome of a successful transfer, passed to QueueTransfers.onComplete.

Functions

isRetryableTransferError(Object error, StackTrace stackTrace) → bool
A retryIf rule for task types that run transfers.

Typedefs

BackgroundHeaders = FutureOr<Map<String, String>> Function(BackgroundRequest request)
Headers added to a BackgroundRequest when it is sent, not stored with it, for example an Authorization header with a fresh token.
BackgroundResponseCallback = FutureOr<void> Function(BackgroundRequest request, TransferResult result)
Called with the server's answer to a BackgroundRequest.

Exceptions / Errors

TransferEnqueueException
background_downloader refused to enqueue a transfer.
TransferException
A transfer ended without success.
TransferLostException
A handed-off transfer that background_downloader no longer knows about, for example because its records were cleared. Retrying starts it again.