- Removed old pre-Flutter-1.12 Android project plugin method
registerWithwhich has been removed from flutter 3.29.0
- Add onInvalidLocale callback to
namemethod.
- Fix minor regression where
initwould fail if the device's locale was null.
- Handles an issue where the country code could not be resolved and an exception was thrown.
- Address an issue where init could use an empty list.
- Adds sub regions.
- Addresses an issue when the code could not be resolved and an exception was thrown.
- Adds
countryCodeproperty.
- Adds Android namespace and other minor improvements.
- Upgrades to Android project (pre 1.12). Thank you @vergardan.
- Fixes Sint Marteen code (#20).
- Adds a method to get a
Listwith all country's details (#16). Thank you @wizlif.
- Updates gradle to 5.4.1. (#15)
- Updates to null safety. Thank you @AntonyLeons.
- Adds new codes from Netherlands Antilles dissolution (#5). Thanks @comESK.
- Fixes dial code for Shqipëria.
- Sets default
Localeto en-US whenever a device hasn't a default locale set (typically will happen only on iOS simulators).
- Updates assert to also validate that
countryCodeis notnull.
- Added
localizedNameproperty toCountryDetails. This allows you to display any country name base on aLocalelanguage. Must be set when doingCountryCodes.init(locale), defaults to device's language. - Updated Android
compileSdkVersionto 29 andminSdkVersionto 21; - Updated example app;
Exposes device Locale (language and country code) instead of country only.
Updates dialCode() to receive the [locale] optionally instead of explictly null in order to retrieve the device's region dial code.
Replaces FutureOr<Locale> with Locale to make it explicitly synchronous when invoking getDeviceLocale()
Exposes device's Locale through getDeviceLocale() method.
Updates README
- Adds default
localefrom device region when not provided. For this to work, please callCountryCodes.init()before invoking other methods. - Overall minor improvements.
Format
Adds license (MIT)
Initial release. Provides access to DialCodeFormatter for TextFormFields, alpha2Code, dialCode and name.