getLocationData function

dynamic getLocationData()

Implementation

getLocationData() async {
  Map<String, dynamic> data = {};
  var position = await Geolocator.getCurrentPosition(
      desiredAccuracy: LocationAccuracy.high);
  data['lon'] = position.longitude;
  data['lat'] = position.latitude;
  data['alt'] = position.altitude;
  return data;
}