JobHandler typedef
JobHandler =
Future<void> Function(ServiceInstance service, Map<String, dynamic> ? payload, SqliteConnection db)
Signature for a job handler function.
Job handlers are responsible for executing the actual background task
associated with a jobKey
.
service
: TheServiceInstance
for interacting with the background service.payload
: An optional Map<String, dynamic> containing data for the job.db
: TheSqliteConnection
for the background isolate, provided by BackgroundService after it's set in AppInitializationCallback.
Implementation
typedef JobHandler =
Future<void> Function(
ServiceInstance service,
Map<String, dynamic>? payload,
SqliteConnection db,
);