Potential fix for broken background task
This commit is contained in:
parent
30d5c39fcf
commit
3f89dc5c99
1 changed files with 2 additions and 0 deletions
|
@ -109,6 +109,8 @@ Future<void> _runInBackground(String taskId) async {
|
|||
BackgroundFetch.finish(taskId);
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/a/73796478/546896
|
||||
@pragma('vm:entry-point')
|
||||
void _headlessTaskHandler(HeadlessTask task) {
|
||||
if (task.timeout) {
|
||||
BackgroundFetch.finish(task.taskId);
|
||||
|
|
Loading…
Reference in a new issue