onBackground property
must be a top level or static method this method will be executed by background fetch make sure you don't execute long running task there because of limitations on ios recommended maximum executed duration is only 15-20 seconds.
Implementation
final FutureOr<bool> Function(ServiceInstance service)? onBackground;