requestLocationName method

Future<String> requestLocationName({
  1. required double latitude,
  2. required double longitude,
})

Implementation

Future<String> requestLocationName(
    {required double latitude, required double longitude}) async {
  Map<String, dynamic> decodedResponse =
      await HttpRequestCustom.requestWithLatLng(
          latitude: latitude, longitude: longitude);
  notifyListener();

  return await RequestService.checkInternet() == true
      ? decodedResponse['display_name'] ?? "MOVE TO CURRENT POSITION"
      : "Check your connection";
}