After initialising the the workmanager and creating either of the tasks, If we use any plugins inside of the task execution it isn't recognised and throw an error as bellow MissingPluginException(No implementation found for method getLocation on channel lyokone/location)
Actual code :
Workmanager.executeTask((task, inputData) async {
Location locationObject = Location();
locationObject.getLocation();
print(locationObject);
return Future.value(true);
}
Basically any other plugin used inside of the task of work manager seems to be not recognised.
What am I missing, Do I need to register all my plugins again ?
I/flutter (16120): Location permission has error
I/flutter (16120): MissingPluginException(No implementation found for method serviceEnabled on channel lyokone/location)