address_formatter 0.3.0
address_formatter: ^0.3.0 copied to clipboard
Converts address components into correctly formatted postal addresses for countries worldwide, following the OpenCage address-formatting specification.
Changelog #
0.3.0 #
- Removed the
formatLanguageCodeparameter. Language-specific format templates (e.g. selecting a Chinese vs. English layout for Taiwan) are no longer supported; the country default is always used, consistent with other implementations of the OpenCage spec. - Removed the
countryNameLanguageCodeparameter and the CLDR-backedkTerritoryNamesconstant. Country names are now sourced from the inline comments in OpenCage'scountry_codes.yamland stored in the newkCountryNamesconstant (English only). When the geocoder response includes acountry_codebut nocountry, the formatter injects the English country name automatically. - Added
example/example.dartdemonstrating how to query the Nominatim API and format the returned address components.
0.2.0 #
- Added
countryNameLanguageCodeparameter toformat(),multiLineFormat(), andsingleLineFormat(). Accepts any ISO 639-1 code from Flutter'skMaterialSupportedLanguages(81 languages); unsupported codes fall back to'en'. Defaults to'en'. - Country display names are sourced from CLDR (
cldr-localenames-full) and stored in the new generated constantkTerritoryNames. Short forms are preferred over verbose ones where CLDR provides them (e.g.HK→'Hong Kong'rather than'Hong Kong SAR China').
0.1.0 #
Converts address components into correctly formatted postal addresses for countries worldwide, following the OpenCage address-formatting specification.