Add custom search InputDecoration to SelectionDialog

This commit is contained in:
Andrew Fulton
2019-04-01 22:03:06 -05:00
parent 7cec16c29d
commit b47fa559ab
2 changed files with 10 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ class CountryCodePicker extends StatefulWidget {
final TextStyle textStyle;
final EdgeInsetsGeometry padding;
final bool showCountryOnly;
final InputDecoration searchDecoration;
CountryCodePicker({
this.onChanged,
@@ -22,6 +23,7 @@ class CountryCodePicker extends StatefulWidget {
this.textStyle,
this.padding = const EdgeInsets.all(0.0),
this.showCountryOnly = false,
this.searchDecoration,
});
@override
@@ -108,7 +110,8 @@ class _CountryCodePickerState extends State<CountryCodePicker> {
showDialog(
context: context,
builder: (_) => new SelectionDialog(elements, favoriteElements,
showCountryOnly: widget.showCountryOnly),
showCountryOnly: widget.showCountryOnly,
searchDecoration: widget.searchDecoration,),
).then((e) {
if (e != null) {
setState(() {