flutter_country_picker 0.1.3 flutter_country_picker: ^0.1.3 copied to clipboard
A new flutter plugin project.
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
onChanged: (Country country) {
setState(() {
_selected = country;
});
},
selectedCountry: _selected,
),
),
);
}