workmanager library

Classes

BackoffPolicyConfig
Constraints
InitializeRequest
OneOffTaskRequest
PeriodicTaskRequest
ProcessingTaskRequest
Workmanager
Make sure you followed the platform setup steps first before trying to register any task.
WorkmanagerFlutterApi
WorkmanagerHostApi
WorkmanagerPlatform
The interface that implementations of workmanager must implement.

Enums

BackoffPolicy
An enumeration of backoff policies when retrying work. These policies are used when you have a return ListenableWorker.Result.retry() from a worker to determine the correct backoff time. Backoff policies are set in WorkRequest.Builder.setBackoffCriteria(BackoffPolicy, long, TimeUnit) or one of its variants.
ExistingPeriodicWorkPolicy
An enumeration of the conflict resolution policies when registering periodic work with the same unique name.
ExistingWorkPolicy
An enumeration of the conflict resolution policies when registering one-off work with the same unique name.
NetworkType
An enumeration of various network types that can be used as Constraints for work.
OutOfQuotaPolicy
An enumeration of policies that help determine out of quota behavior for expedited jobs.
TaskStatus
Task status for debugging and monitoring.

Functions

wrapResponse({Object? result, PlatformException? error, bool empty = false}) List<Object?>

Typedefs

BackgroundTaskHandler = Future<bool> Function(String taskName, Map<String, dynamic>? inputData)
Function that executes your background work. You should return whether the task ran successfully or not.