WorkmanagerExecution class
Shared registry that holds the currently registered background task handler.
One instance is shared by every execution context that runs the compiled dispatcher bundle (the page fallback path, the in-page Web Worker and the Service Worker), so dispatcher code stays identical everywhere.
Properties
- callbackDispatcher ↔ Function?
-
The callback dispatcher passed to
WorkmanagerWeb().initialize(...).getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taskHandler ↔ BackgroundTaskHandler?
-
The handler registered by the most recent executeTask call.
getter/setter pair
Methods
-
executeTask(
BackgroundTaskHandler handler) → void -
Registers
handleras the background task handler (mirrorsWorkmanager().executeTask(...)). -
normalizeInputData(
Object? value) → Map< String, dynamic> ? -
Normalizes JSON-ish
valueinto theinputDatashape delivered to the background task handler (Map<String, dynamic>with recursively normalized nested maps and lists). -
normalizeInputDataValue(
Object? value) → Object? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runTask(
String taskName, Object? rawInputData) → Future< bool> -
Runs the registered handler with
taskNameandrawInputData. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → WorkmanagerExecution
-
The process-wide singleton.
final