BackgroundTaskHandler typedef

BackgroundTaskHandler = Future<bool> Function(String taskName, Map<String, dynamic>? inputData)

Signature of the handler invoked when a background task runs.

taskName is the value passed when registering the task; inputData is the registered input data (int, bool, double, String and their lists/maps).

Implementation

typedef BackgroundTaskHandler = Future<bool> Function(
  String taskName,
  Map<String, dynamic>? inputData,
);