flutter_country_picker_nm 0.0.3 copy "flutter_country_picker_nm: ^0.0.3" to clipboard
flutter_country_picker_nm: ^0.0.3 copied to clipboard

A Flutter Country Picker Widget with support to country dialing codes.

Pub

flutter_country_picker_nm #

A Flutter Country Picker Widget with support to country dialing codes.It is forked from flutter_country_picker to implement null-safety and further development

Usage #

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


///full Great Britain sample.
///static const Country GB = Country(
///    asset: "assets/flags/gb_flag.png",
///    dialingCode: "44",
///    isoCode: "GB",
///    name: "United Kingdom",
///    currency: "British pound",
///    currencyISO: "GBP",
///  );


 @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
         showCurrency: false, //eg. 'British pound'
         showCurrencyISO: true, //eg. 'GBP'
         onChanged: (Country country) {
           setState(() {
             _selected = country;
           });
         },
         selectedCountry: _selected,
       ),
     ),
   );
 }

0
likes
110
pub points
68%
popularity

Publisher

unverified uploader

A Flutter Country Picker Widget with support to country dialing codes.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

diacritic, flutter

More

Packages that depend on flutter_country_picker_nm