getCountryLevelItem static method

Landmark? getCountryLevelItem(
  1. String countryIsoCode
)

Get the country-level Landmark for a given ISO country code.

This returns a country-level landmark that can be used as the parent for subsequent guided searches. Returns null when the provided countryIsoCode is invalid or no matching country is found.

Parameters

  • countryIsoCode: ISO country code (for example, 'US' or 'ESP').

Returns

  • Landmark?: Country-level landmark if found; otherwise null.

Also see:

Implementation

static Landmark? getCountryLevelItem(final String countryIsoCode) {
  final OperationResult resultString = staticMethod(
    'GuidedAddressSearchService',
    'getCountryLevelItem',
    args: countryIsoCode,
  );

  final Landmark result = Landmark.init(resultString['result']);

  if (result.name.isEmpty) {
    return null;
  }
  return result;
}