Baseflow / flutter-geocoding

A Geocoding plugin for Flutter
https://baseflow.com
MIT License
136 stars 71 forks source link

Getting null value in this line of code, List<Placemark> placemarks = await placemarkFromCoordinates(position!.latitude, position!.longitude); unable to get current address #239

Closed Priya-Manoharan closed 2 months ago

Priya-Manoharan commented 2 months ago

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

Your question

Future getCountry() async { emit(LocationLoading()); try { await getLocation(); if (position != null) { List placemarks = await placemarkFromCoordinates(position!.latitude, position!.longitude); print("placemarks $placemarks"); place = placemarks[0]; emit(LocationSuccess()); } else { emit(LocationFail('Failed to get the position.')); } } catch (e) { emit(LocationFail(e.toString())); } }

getting null value in the placemarkFromCoordinates function

Version

geocoding: ^3.0.0