BackgroundTaskCallback typedef

BackgroundTaskCallback = FutureOr<bool> Function(Map<String, dynamic> data)

Callback signature for asynchronous background task execution.

Returns true if the background task completed successfully, or false on failure.

Example:

Future<bool> mySyncTask(Map<String, dynamic> data) async {
  await syncPendingData();
  return true;
}

Implementation

typedef BackgroundTaskCallback = FutureOr<bool> Function(Map<String, dynamic> data);