Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MissingPluginException(No implementation found in flutter using geolocator

i am using geolocator in flutter project to get current location but this error come on it. i added all dependencies in both ios and android files still get this error i dont know why flutter channel stable, 2.12,

here is my code:

Position position = await Geolocato.getCurrentPosition( desiredAccuracy: LocationAccuracy.high);

here is my error coming which i tested android 10, 8 also, but answer same

Unhandled Exception: MissingPluginException(No implementation found for method getCurrentPosition on channel flutter.baseflow.com/geolocator)

i am using geolocator plugin here is plugin link :https://pub.dev/packages/geolocator

like image 918
Adnan haider Avatar asked Jul 15 '26 00:07

Adnan haider


1 Answers

Running flutter clean and flutter pub get fixed the issue for me. I uninstalled the application, cleared the cache of my device and rebuilt the app. This time there was a popup asking to give location permission to the app.

I gave the access and got the current position of the device (latitude and longitude).

Also make sure you upgrade flutter to 3.0.0 by running flutter upgrade

like image 107
Anubhav Bagri Avatar answered Jul 17 '26 16:07

Anubhav Bagri