diff --git a/README.md b/README.md index 09c3b8e..e507670 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,10 @@ To use this plugin, add `country_list_pick` as a [dependency in your pubspec.yam isDownIcon: true, // to show country in English showEnglishName: true, - // to initial code number countrey + // to initial code number country initialSelection: '+62', + // to change background color of the widget + backgroundColor: Colors.transparent, // to get feedback data from picker onChanged: (CountryCode code) { // name of country @@ -76,6 +78,7 @@ class _MyAppState extends State { isShowCode: true, isDownIcon: true, initialSelection: '+62', + backgroundColor: Colors.transparent, onChanged: (CountryCode code) { print(code.name); print(code.code); diff --git a/lib/country_list_pick.dart b/lib/country_list_pick.dart index bea5932..2355cce 100644 --- a/lib/country_list_pick.dart +++ b/lib/country_list_pick.dart @@ -14,7 +14,7 @@ class CountryListPick extends StatefulWidget { this.isShowCode, this.isShowTitle, this.initialSelection, - this.showEnglishName}); + this.showEnglishName, this.backgroundColor}); final bool isShowTitle; final bool isShowFlag; final bool isShowCode; @@ -22,6 +22,7 @@ class CountryListPick extends StatefulWidget { final String initialSelection; final bool showEnglishName; final ValueChanged onChanged; + final Color backgroundColor; @override _CountryListPickState createState() { @@ -75,6 +76,7 @@ class _CountryListPickState extends State { @override Widget build(BuildContext context) { return FlatButton( + color: widget.backgroundColor, onPressed: () { _awaitFromSelectScreen(context); },