flutter_simple_country_picker 0.10.2
flutter_simple_country_picker: ^0.10.2 copied to clipboard
An easy-to-use country selection widget for Flutter. Allows users to select a country from a comprehensive list. Supports Android, iOS, web, Windows and Linux platforms.
Changelog #
0.10.2 #
- CHANGED:
CountryPhoneInput.extendednow applies a single resolved picker text style consistently to the country label, country code, input text, cursor, and hint text
0.10.1 #
- ADDED:
enableOpenPickertoCountryPhoneInputandCountryPhoneInput.extendedso the country-prefix button can stay visible while the picker opening is disabled
0.10.0 #
- BREAKING CHANGES:
CountryPhoneControlleris now a concreteValueNotifier<CountryPhoneEditingValue>controller instead of anextension type - BREAKING CHANGES: removed
overflowNotifier,onOverflowChanged,incompleteNotifier, andonIncompleteChangedfromCountryPhoneInput; observeCountryPhoneControlleritself orCountryPhoneController.valueStatusinstead - BREAKING CHANGES: removed
onOverflowChanged,overflowNotifier,onIncompleteChanged, andincompleteNotifierfromCountryInputFormatter; readvalueStatusinstead - ADDED:
CountryPhoneEditingValueto keep raw text, normalized phone, resolution, andCountryPhoneValueStatusinside one controller value - ADDED:
CountryPhoneController.fromValue(...)for SDK-style initialization from a completeCountryPhoneEditingValue - CHANGED: hidden the internal
CountryPhoneInput$Extendedimplementation from the package root export; useCountryPhoneInput.extended(...)as the public entry point - CHANGED: marked
CountryPhoneInput$Extendedas internal to make the intended public API explicit
0.9.0 #
- BREAKING CHANGES: removed
CountryPhoneController.countryCode,matchingCountryCodes,isCountryCodeAmbiguous, andisCountryCodeExact; useresolutionas the source of truth - ADDED: phone example to each country, #11
- ADDED: phone mask to each country, #12
- ADDED: optional formatter support for normalizing pasted and preset phone numbers before applying a mask
- ADDED:
CountryPhoneController.resolutionwith explicitstatusand ordered candidate country codes - ADDED: the simplified dataset-based
CountryPhoneControllerresolution flow in the README - ADDED: contributor workflow and invariants for maintaining
country_codes.dartand the generatedcountry_codes.json - ADDED: a dedicated maintainer guide for
country_codeswith concrete good and bad examples for shared calling-code groups - ADDED: README migration notes for
CountryPhoneController, runtime gotchas, and maintainer policies for choosing sources,level, and stable dataset diffs - FIXED: pasted numbers with full country code or national prefix are now normalized before formatting
- FIXED: formatter no longer strips the selected country code from numbers that belong to another country
- FIXED:
CCandCXreference examples in the bundled country dataset so shared+61plans resolve to the correct territory - CHANGED:
CountryPhoneControllerresolution now relies only on the bundled dataset because shared country groups for+61,+212, and+590were removed from the source dataset
0.8.0 #
- BREAKING CHANGES:
CountryLocalizationsis now anabstract class— previouslyfinal class; it can now be extended to provide custom or additional translations - BREAKING CHANGES:
CountryLocalizations()constructor no longer accepts aLocaleargument — thelocalefield has been removed; useLocalizations.localeOf(context)in your own code if the locale is needed - BREAKING CHANGES:
CountryLocalizations.of()no longer throwsArgumentErrorwhen no delegate is found — falls back to English (CountryLocalizationsEn) - DEPRECATED:
CountryLocalizations.countryNameRegExp— usegetFormatedCountryNameByCodeinstead - CHANGED:
CountryLocalizations— complete internal rewrite following the Flutter SDK localization pattern:- Each supported language is now a concrete
final class CountryLocalizationsXx extends CountryLocalizations - Country name maps moved from shared module-level variables to per-class
const Map<String, String> _names - UI strings (
cancelButton,phonePlaceholder,searchPlaceholder,selectCountryLabel) are now typed abstract getters instead of map entries - Delegate uses
SynchronousFutureinstead ofFuture.value isSupporteduses aSet<String>O(1) lookup instead ofList.containsO(n)supportedLocalesis nowconst List<Locale>country_parser.dartusesLocalizations.localeOf(context)and polymorphiccountryName()calls
- Each supported language is now a concrete
- ADDED:
- Abstract typed API on
CountryLocalizations:String get cancelButton,String get phonePlaceholder,String get searchPlaceholder,String get selectCountryLabel,String? countryName(String countryCode) String? getFormatedCountryNameByCode(String countryCode)concrete method — returns the country name with collapsed whitespace- Unit tests covering all 36 locales, delegate behaviour, fallback, and content correctness (
test/unit_test/country_localizations_test.dart) - Widget tests exercising
CountryLocalizations.of()inside a widget tree for every locale (test/widget_test/country_localizations_test.dart) - FIXED: The height of the search field in the "CountryListView" to now take into the height of the bottom border of the app bar, which is 1 pixel, so the total height of the search field is now 56 pixels instead of 55 pixels
- Abstract typed API on
0.7.0 #
- BREAKING CHANGES:
CountryInputFormatteroverflow behavior changed — previously input longer than mask was truncated to mask length; now when input exceeds mask length, mask is reset and the value becomes flat (digits-only) - CHANGED:
CountryInputFormatter- Mask symbol lookup from
List.contains()toSet.contains()forO(1)checks TextMatcher.lengthto be cached(O(1))instead of calculating via fold() each time
- Mask symbol lookup from
- ADDED:
CountryInputFormatter- Flat-mode support to
CountryInputFormatter(digits-only output) when mask length is exceeded onOverflowChangedandoverflowNotifierto notify when input exceeds mask length
- Flat-mode support to
- ADDED:
onBackgroundandonSecodaryBackgroundcolor's toCountryPickerTheme
0.6.5 #
- BREAKING CHANGES:
getAll()method inCountryProvidertogetCountries() - ADDED:
maskfield toCY-Cypruscountry - CHANGED: removed checking on mask field in
CountryPhoneInputwidget, now if mask field is not null, it will be applied to phone number input - CHANGED:
showGroupinCountryControllerto be set based only onshowGroupparameter, not on the number of countries in the list - CHANGED: Grouping countries by data structure instead of grouping them in the widget
0.6.4 #
- ADDED: mask field for
Indonesia,Iran - CHANGED:
useGrouptoshowGroupinCountryController - FIXED: mask field for
Thailand-> now it is0 0000 0000instead of000 000 000 - FIXED: country code for
ID-Indonesiainstead ofIndiafortrandrulocalizations
0.6.3 #
- FIXED:
CountryPhoneInputwidget to applytextStyleto cursor properties
0.6.2 #
- FIXED:
Countrymodel to includemaskfield intoJsonmethod
0.6.1 #
- FIXED:
CountryInputFormatterthe default mask filter has been fixed, now it is possible to have a mask with values 0,#,A
0.6.0 #
- BREAKING CHANGES: Bahamas coutry code from
12421to1242 - BREAKING CHANGES:
CountryPhoneInputwidget now requiresCountryPhoneControllerin exchange forValueNotifier<String> - ADDED:
CountryPhoneControllerto manage country and phone number state, formatting, and validation - ADDED: Tests for country codes data completeness in
CountryPhoneControllertests - CHANGED: Refactoring country codes data to include
maskfield withnullvalues - CHANGED: Updated unit tests to handle new country codes data structure
- FIXED: Bahamas coutry code from
12421to1242
0.5.2 #
- ADDED:
countryControllertoCountryPhoneInputwidget
0.5.1 #
- ADDED:
onCountryChangedcallback toCountryPhoneInputwidget
0.5.0 #
- ADDED: Adaptive modal presentation for
iOSplatform inshowCountryPickerfunction
0.4.0 #
- ADDED:
CountryPhoneInput.extendedconstructor for extended functionality - CHANGED: Updated documentation for
CountryPhoneInputwidget
0.3.0 #
- ADDED: More localizations support
- CHANGED: Refactoring
CountryController.getCountriesto measure performance - REMOVED:
flutter_localizationsandflutter_intlfrom dependencies - CHANGED: Make controller method as
async
0.2.9 #
- ADDED: New
autofocusargument to replaceuseAutofocus - CHANGED: Make
useAutofocusdeprecated - CHANGED: Refactoring controller and state
- CHANGED:
CountryPickerThememake properties nullable
0.2.8 #
- CHANGED:
README - CHANGED: Package metadata
- UPDATED: Bump dependencies
0.2.7 #
- CHANGED: Refactoring
CountryPickerTheme,CountryUtil - CHANGED: Bump dependencies
0.2.6 #
- ADDED: Default
keyboardTypetoCountryPhoneInput - ADDED: Windows preview
0.2.5 #
- UPDATED: CountryPickerInput placeholer text style
0.2.4 #
- FIXED: CountryPhoneInput formater
- UPDATED: CountryPickerTheme
0.2.3 #
- CHANGED: Bump dependencies
0.2.1 #
- CHANGED: Refactoring
0.2.0 #
- ADDED: Tests
0.1.3 #
- UPDATED:
SafeAreafromCountriesList
0.1.2 #
- UPDATED: Bump
flutter_lints
0.1.0 #
- UPDATED:
example's
0.0.2 #
- CHANGED: Refactoring
0.0.1 #
- UPDATED: Localizations
0.0.1-pre.4 #
- ADDED:
CountryInputFormatter - UPDATED:
CountryUtil
0.0.1-pre.3 #
- ADDED: Selected country to show mark intro list of countries
- FIXED:
Android - FIXED:
iOS
0.0.1-pre.2 #
- ADDED:
localizations
0.0.1-pre.1 #
- CHANGED: Refactoring
0.0.1-pre.0 #
- ADDED: Initial publication