background_downloader library

Classes

BasePersistentStorageMigrator
Migrates from LocalStorePersistentStorage to another PersistentStorage
Batch
Contains tasks and results related to a batch of tasks
Config
Database
Persistent database used for tracking task status and progress.
DataTask
Class for background requests that do not involve a file
DownloadProgressIndicator
Progress indicator for use with the FileDownloader
DownloadTask
Information related to a download task
FileDownloader
Provides access to all functions of the plugin in a single place.
LocalStorePersistentStorage
Default implementation of PersistentStorage using Localstore package
MemoryTaskQueue
TaskQueue that holds all information in memory
MultiUploadTask
Information related to an UploadTask, containing multiple files to upload
ParallelDownloadTask
PersistentStorage
Interface for the persistent storage used to back the downloader
PersistentStorageMigrator
Interface to migrate from one persistent storage to another
Request
A server Request
ResumeData
Holds data associated with a resume
Task
Information related to a Task
TaskNotification
Notification specification for a Task
TaskNotificationConfig
Notification configuration object
TaskProgressUpdate
A progress update
TaskQueue
Interface allowing the FileDownloader to signal finished tasks to a TaskQueue
TaskRecord
Record containing task, task status and task progress.
TaskStatusUpdate
A status update
TaskUpdate
Base class for updates related to task. Actual updates are either a status update or a progress update.
UploadTask
Information related to an upload task

Enums

BaseDirectory
Base directory in which files will be stored, based on their relative path.
NotificationType
Notification types, as configured in TaskNotificationConfig and passed on to TaskNotificationTapCallback
PermissionStatus
PermissionType
RequireWiFi
Wifi requirement modes at the application level
SharedStorage
Shared storage destinations
TaskStatus
Defines a set of possible states which a Task can be in.
Undelivered
Types of undelivered data that can be requested
Updates
Type of updates requested for a task or group of tasks

Typedefs

BatchProgressCallback = void Function(int succeeded, int failed)
Signature for a function you can provide to the downloadBatch or uploadBatch that will be called upon completion of each task in the batch.
TaskNotificationTapCallback = void Function(Task task, NotificationType notificationType)
Signature for function you can register to be called when a notification is tapped by the user
TaskProgressCallback = void Function(TaskProgressUpdate update)
Signature for a function you can register to be called for every progress change of a task.
TaskStatusCallback = void Function(TaskStatusUpdate update)
Signature for a function you can register to be called when the status of a task changes.

Exceptions / Errors

TaskConnectionException
Exception related to the connection, e.g. socket exception or request timeout
TaskException
Contains Exception information associated with a failed Task
TaskFileSystemException
Exception related to the filesystem, e.g. insufficient space or file not found
TaskHttpException
Exception related to the HTTP response, e.g. a 403 response code
TaskResumeException
Exception related to an attempt to resume a task, e.g. the temp filename no longer exists, or eTag has changed
TaskUrlException
Exception related to the url, eg malformed