fetch3wa method

Future<void> fetch3wa(
  1. double lat,
  2. double lng
)

Converts latitude and longitude into a 3-word address.

Implementation

Future<void> fetch3wa(double lat, double lng) async {
  isLoading = true;
  errorMessage = null;
  notifyListeners();

  try {
    result = await convertTo3wa(lat, lng);
    errorMessage = null;
  } catch (e) {
    errorMessage = 'Error: ${e.toString()}';
    result = null;
  } finally {
    isLoading = false;
    notifyListeners();
  }
}