country_picker 2.0.8 copy "country_picker: ^2.0.8" to clipboard
country_picker: ^2.0.8 copied to clipboard

outdated

A flutter package to select a country from a list of countries.

[2.0.8] - 13 Sep 2021 #

  • 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}'),
    );
    

[2.0.7] - 28 Jul 2021 #

  • Add support for Turkish localization

[2.0.6] - 02 Jul 2021 #

  • Add support for Nepali and Hindi localization

[2.0.5] - 31 May 2021 #

  • 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}'),
    );
    

[2.0.4] - 12 Apr 2021 #

  • Add CountryParser

[2.0.3] - 30 Mar 2021 #

  • Add Ukrainian, Russian, and Polish translations
  • Add onClosed callback

[2.0.2] - 23 Mar 2021 #

  • Add support for Norwegian localization

[2.0.1] - 15 Mar 2021 #

  • 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}'),
    );
    

[2.0.0] - 09 Mar 2021 #

  • Migrated to null safety

[1.1.4] - 18 Feb 2021 #

  • Add support for Spanish and Portuguese localization.
  • If showPhoneCode is false remove duplicates country

[1.1.3] - 10 Dec 2020 #

  • Localize label and hint of search text field

[1.1.2] - 11 Oct 2020 #

  • 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}'),
     );
    

[1.1.1] - 24 Sep 2020 #

  • Search on localizations.

[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.
352
likes
0
pub points
99%
popularity

Publisher

unverified uploader

A flutter package to select a country from a list of countries.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on country_picker