Skip to content

A Flutter Country Picker Widget with support to country dialing codes

License

Notifications You must be signed in to change notification settings

wintermuteturbo/flutter_country_picker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pub

flutter_country_picker

A Flutter Country Picker Widget with support to country dialing codes

Usage

Add the CountryPicker widget in your layout and use the onChanged callback.
Full example

// Option to show what to display of the selected country when 'dense' is false,
// Only displays country's flag when dense is true.


 @override
 Widget build(BuildContext context) {
   return new Scaffold(
     appBar: new AppBar(
       title: Text('Flutter Country Picker Demo'),
     ),
     body: new Center(
       child: CountryPicker(
         dense: false,
         showFlag: true,  //displays flag, true by default
         showDialingCode: false, //displays dialing code, false by default
         showName: true, //displays country name, true by default
         limitCountries: ['IE', 'US', 'PL'] // limits country choice to listed countries
         onChanged: (Country country) {
           setState(() {
             _selected = country;
           });
         },
         selectedCountry: _selected,
       ),
     ),
   );
 }

About

A Flutter Country Picker Widget with support to country dialing codes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 88.7%
  • Ruby 4.9%
  • Kotlin 2.9%
  • Swift 2.7%
  • Objective-C 0.8%