CountryExtensions extension

Extension methods for interacting with Country instances.

on

Methods

findClosest(GeoCoords target) GeoLocationNode?

Available on Country, provided by the CountryExtensions extension

Finds the GeoLocationNode (City, Region, or Country) instance closest to the provided target
findClosestCity(GeoCoords target) City?

Available on Country, provided by the CountryExtensions extension

Finds the City in this Country nearest to the target.
findClosestRegion(GeoCoords target) Region?

Available on Country, provided by the CountryExtensions extension

Finds the Region in this Country nearest to the target.

Available on Country, provided by the CountryExtensions extension

Finds the GeoLocationNode (City, or Region) with a name containing the value
stateCodeToName({required String code}) String

Available on Country, provided by the CountryExtensions extension

Resolves a Region.stateCode to its name