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: TheServiceInstancefor interacting with the background service.payload: An optional Map<String, dynamic> containing data for the job.db: TheSqliteConnectionfor 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,
);