Use the temporary solution described here:
https://github.com/fluttercommunity/flutter_workmanager/issues/551
Instead of adding the Package normally like this:
workmanager: ^0.5.2
Add it with a specific commit like this:
workmanager:
git:
url: https://github.com/fluttercommunity/flutter_workmanager.git
ref: b783000