country_picker 1.1.0
country_picker: ^1.1.0 copied to clipboard
A flutter package to select a country from a list of countries.
1.1.0 19 Sep 2020 #
Implement localization. #
Add the CountryLocalizations.delegate in the list of your app delegates.
MaterialApp(
supportedLocales: [
const Locale('en'),
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'), // Generic Simplified Chinese 'zh_Hans'
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'), // Generic traditional Chinese 'zh_Hant'
],
localizationsDelegates: [
CountryLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
home: HomePage(),
);
Supported languages: #
- English
- Simplified Chinese
- Traditional Chinese
1.0.5 31 Aug 2020 #
- Update documentation.
1.0.4 27 Aug 2020 #
- Implement search.
1.0.3 22 Aug 2020 #
- Add show phone code option.
1.0.2 18 Aug 2020 #
- Add exclude countries option.
Can be used to exclude(remove) one ore more country from the countries list
showCountryPicker(
context: context,
exclude: <String>['KN', 'MF'], //It takes a list of country code(iso2).
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
1.0.1 12 Aug 2020 #
- Add documentation.
1.0.0 11 Aug 2020 #
- Initial developers preview release.