flutter_workmanager
flutter_workmanager copied to clipboard
geolocation does not work in workmanger
geolocation does not work in workmanger
This is not the correct package
Please use a location package for your requirements.
@xunreal75 Why we could not use geolocator plugin? It's more popular than location package.
You need background location service. That's not covered with workmananager , not intended and a complete other approach and functionality.
In callbackDispatcher you need to add:
Workmanager().executeTask((taskName, inputData) async { DartPluginRegistrant.ensureInitialized();
And then you can use Geolocator in this method