getAddress method
Implementation
@override
Future<Placemark?> getAddress({
required double lat,
required double lon,
}) async {
try {
// Call placemarkFromCoordinates on the geocoding instance
final Placemark placeMark = (await _geocoding.placemarkFromCoordinates(
lat,
lon,
))
.first;
debugPrint(
'AddressServiceImpl | getAddress | address : ${placeMark.toString()}',
);
return placeMark;
} catch (e) {
debugPrint('AddressServiceImpl | getAddress | error: $e');
}
return null;
}