Question

How to Get Device Lat Long in Flutter

I need Device current latitude and longitude in flutter how to get it ?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Refer to below link, which provides some insights about Flutter:

https://www.digitalocean.com/community/tutorials/flutter-geolocator-plugin https://stackoverflow.com/questions/54926496/how-to-get-current-location-on-flutter-sdk-1-2-1

Below would fetch that information:

if (_currentPosition != null) Text( “LAT: ${_currentPosition.latitude}, LNG: ${_currentPosition.longitude}”), FlatButton( child: Text(“Get location”), onPressed: () { _getCurrentLocation();

Hope this helps!

Cheers, Sri Charan