onServiceError property

void Function(Object error, StackTrace stackTrace)? onServiceError
getter/setter pair

Optional default error handler for all tasks run by this service.

If provided, this function is called when a task fails after all retries.

Implementation

void Function(Object error, StackTrace stackTrace)? onServiceError;