getCountryLevelItem static method

Landmark? getCountryLevelItem(
  1. String countryIsoCode
)

Get the country level item for specific country iso code that can be used by guided address search.

Parameters

  • IN countryIsoCode The country iso code for which to get the country level item.

Returns

  • Valid Landmark if the countryIsoCode is valid.
  • Null if the countryIsoCode is not valid

Throws

  • An exception if it fails.

Implementation

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

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

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