Flutter Workmanager Task not updating with app update


So I have an issue where my existing Flutter Workmanager background task is not updating automatically following the app’s update.

I have the example code which sets up a periodic Workmanager job.

void main() async

  await Workmanager().registerPeriodicTask(
      initialDelay: Duration(minutes: 15,
      frequency: Duration(hours: 1)

void callbackDispatcher() async
  Workmanager().executeTask((task, inputData) async 
    await DoSomething();
    return Future.value(true);

If I update DoSomething() in my background task, currently it does not update for the user and it would continue doing the old thing, not the new thing.

Is there any way to update the background task without the user having to do anything following the apps automatic update?


Through testing and debugging using adb to update the app (flutter run is not suitable), the resolution was to add existingWorkPolicy: ExistingWorkPolicy.append to the periodic task registry.

Answered By – BadgerHobbs

Answer Checked By – Gilberto Lyons (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *