dach_locator library

Classes

Region
Given a zip code the purpose of this package is to resolve a set of Region.

Enums

AustriaRegion
Austria with 9 regions (Bundesländer)
Country
DACH locator supports the three countries Germany (D), Austria (A), Switzerland (CH)
GermanRegion
Germany with 16 regions (Bundesländer)
SwitzerlandRegion
Switzerland with 26 regions (Schweizer Kantone)

Functions

getAustriaRegionCode(String plz) Set<AustriaRegion>
Austrian postcodes have four (standard case) or five digits (rare exception). Returns a set of Austrian regions with length 0 or 1.
getGermanRegionCode(String plz) Set<GermanRegion>
Note: There are cities with same postal code but different region, e.g. Pausa-Mühltroff (Sachsen) and Kirschkau (Thüringen) with postal code "07919".
getRegion(String regionCode, {String? countryCode}) Set<Region>
If countryCode is set, the method is identical to getGermanRegionCode, getSwitzerlandRegionCode or getAustriaRegionCode. If countryCode is not given, the country is automatically resolved. Given the current locale, the country of the device is being determined. If no zip code match is resolved, this returns a Region instance without de, ch, at region.
getSwitzerlandRegionCode(String plz) Set<SwitzerlandRegion>
Swiss postcodes always have four digits. Returns a set of Swiss regions with length 0 or 1.