country_code_selector 0.1.0
country_code_selector: ^0.1.0 copied to clipboard
Country code picker with searchable dialog, bottom sheet, Cupertino wheel, dropdown and phone field button. Flags, dial codes and country names in 202 languages.
0.1.0 #
First release.
- Country pickers: searchable dialog, searchable bottom sheet, Cupertino
wheel, dropdown, and
CountryCodeSelectorWidget, a flag and dial code button for phone number fields. - Design your own picker:
customBuilderonshowCountryCodeSelectorBottomSheet(or theCountrySelectorBuilderwidget) provides the filtered countries, search, selection, and the selected country's phone number lengths. - 250 countries and territories with flags, dial codes, and mobile number lengths from libphonenumber.
- Country names in 202 languages, plus regional variants such as Traditional Chinese, Latin Serbian, European Portuguese, and Latin American Spanish, from Unicode CLDR 48.2.0.
Country.isValidPhoneNumbervalidates numbers against libphonenumber's number ranges, in local, trunk-prefixed, or international form, with an optionalmobileOnlycheck.Country.toE164returns the number in E.164 form (+2348031234567) for storing or sending to a backend.phoneNumberLengthgives the digits expected after the dial code. Apps that don't validate numbers don't include libphonenumber's ~2 MB of metadata.pinUserCountryputs the user's country, detected from their locale region, first in the dialog, bottom sheet,CountryCodeSelectorWidget, and custom builder (data.userCountry). Off by default.- Search by name, ISO code, or dial code, with or without
+. - Filter, exclude, sort, pin favourites, and add custom countries with
CountryListConfig. - Square, round, or emoji flags and four layouts with
LayoutConfig; right-to-left support. - Theme every picker with the
CountrySelectorThemeDatatheme extension. CountryRepositoryfor looking up and searching countries without UI.
