dach_locator 1.0.0
dach_locator: ^1.0.0 copied to clipboard
Given a zip code of Germany, Austria or Switzerland the region is resolved.
Given a zip code of Germany, Austria or Switzerland the region is resolved.
Features #
- Insert a zip code and get region and country as result
- If possible add countryCode ('DE', 'CH' or 'AT'), otherwise country is automatically resolved.
Usage #
Region? resolveRegion(String zipCode, {String? countryCode}) {
if (int.tryParse(zipCode) != null && zipCode.length > 3 && zipCode.length < 6) {
return getRegion(zipCode, countryCode: countryCode);
}
return null;
}