- Add support for Arabic localization
- Add support for Croatian localization
- Add options to autofocus at search TextField.
showCountryPicker( context: context, searchAutofocus: true, onSelect: (Country country) => print('Select country: ${country.displayName}'), );
- Add support for Turkish localization
- Add support for Nepali and Hindi localization
- Add styling options for the border-radius and the search field.
showCountryPicker( context: context, countryListTheme: CountryListThemeData( // Optional. Sets the border radius for the bottomsheet. borderRadius: BorderRadius.only( topLeft: Radius.circular(40.0), topRight: Radius.circular(40.0), ), // Optional. Styles the search field. inputDecoration: InputDecoration( labelText: 'Search', hintText: 'Start typing to search', prefixIcon: const Icon(Icons.search), border: OutlineInputBorder( borderSide: BorderSide( color: const Color(0xFF8C98A8).withOpacity(0.2), ), ), ), ), onSelect: (Country country) => print('Select country: ${country.displayName}'), );
- Add
CountryParser
- Add Ukrainian, Russian, and Polish translations
- Add
onClosed
callback
- Add support for Norwegian localization
- Implemented country list theme
showCountryPicker( context: context, countryListTheme: CountryListThemeData( flagSize: 25, backgroundColor: Colors.white, textStyle: TextStyle(fontSize: 16, color: Colors.blueGrey), ), onSelect: (Country country) => print('Select country: ${country.displayName}'), );
- Migrated to null safety
- Add support for Spanish and Portuguese localization.
- If
showPhoneCode
is false remove duplicates country
- Localize label and hint of search text field
- Add support for Greek localization.
- At search change contains to startsWith.
- Add country filter option.
- Can be used to uses filter the countries list (optional).
- It takes a list of country code(iso2).
- Can't provide both exclude and countryFilter
showCountryPicker( context: context, countryFilter: <String>['AT', 'GB', 'DK', 'DE', 'FR', 'GR'], //It takes a list of country code(iso2). onSelect: (Country country) => print('Select country: ${country.displayName}'), );
- Search on localizations.
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(),
);
- English
- Simplified Chinese
- Traditional Chinese
- Update documentation.
- Implement search.
- Add show phone code option.
- 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}'),
);
- Add documentation.
- Initial developers preview release.