flutter_country_picker

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

MIT License

Stars
120
Committers
40

Bot releases are visible (Hide)

flutter_country_picker - v2.0.6

Published by Daniel-Ioannou over 3 years ago

In this version:

  • Add support for Nepali and Hindi localization
flutter_country_picker - v2.0.5

Published by Daniel-Ioannou over 3 years ago

In this version:

  • 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}'),
    );
    
flutter_country_picker - v2.0.4

Published by Daniel-Ioannou over 3 years ago

In this version:

  • Add CountryParser
flutter_country_picker - v2.0.3

Published by Daniel-Ioannou over 3 years ago

In this version:

  • Add Ukrainian, Russian, and Polish translations
  • Add onClosed callback
flutter_country_picker - v2.0.2

Published by Daniel-Ioannou over 3 years ago

In this version:

  • Add support for Norwegian localization
flutter_country_picker - v2.0.1

Published by Daniel-Ioannou over 3 years ago

In this version:

  • 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}');
      },
    );
    
flutter_country_picker - v2.0.0

Published by Daniel-Ioannou over 3 years ago

In this version:

  • Migrated to null safety
flutter_country_picker - v1.1.4

Published by Daniel-Ioannou over 3 years ago

In this version:

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

Published by Daniel-Ioannou almost 4 years ago

In this version:

  • Localize label and hint of search text field
flutter_country_picker - v1.1.2

Published by Daniel-Ioannou about 4 years ago

In this version:

  • 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}'),
     );
    
flutter_country_picker - v1.1.1

Published by Daniel-Ioannou about 4 years ago

In this version:

  • Search on localizations.
flutter_country_picker - v1.1.0

Published by Daniel-Ioannou about 4 years ago

In this version:

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
flutter_country_picker - v1.0.5

Published by Daniel-Ioannou about 4 years ago

In this version:

  • Update documentation.
flutter_country_picker - v1.0.4

Published by Daniel-Ioannou about 4 years ago

In this version:

  • Implement search.
flutter_country_picker - v1.0.3

Published by Daniel-Ioannou about 4 years ago

In this version

  • Add show phone code option.
flutter_country_picker - v1.0.2

Published by Daniel-Ioannou about 4 years ago

In this version:

  • Add exclude countries option.
showCountryPicker(
   context: context,
   exclude: <String>['KN', 'MF'], //It takes a list of country code(iso2).
   onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
flutter_country_picker - v1.0.1

Published by Daniel-Ioannou about 4 years ago

In this version:

  • Add documentation.
flutter_country_picker - v1.0.0

Published by Daniel-Ioannou about 4 years ago

In this version:

  • Initial developers preview release.
Package Rankings
Top 3.85% on Pub.dev
Badges
Extracted from project README
pub package
Related Projects