[Fix] searchDecoration parameter was null

This commit is contained in:
Andrew Fulton
2019-04-01 22:44:12 -05:00
parent b3dff1e3d9
commit 0ad5e79ea2
2 changed files with 2 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ class CountryCodePicker extends StatefulWidget {
this.textStyle,
this.padding = const EdgeInsets.all(0.0),
this.showCountryOnly = false,
this.searchDecoration,
this.searchDecoration = const InputDecoration(),
this.searchStyle,
this.emptySearchBuilder,
});

View File

@@ -19,6 +19,7 @@ class SelectionDialog extends StatefulWidget {
InputDecoration searchDecoration = const InputDecoration(),
this.searchStyle,
}) :
assert(searchDecoration != null, 'searchDecoration must not be null!'),
this.searchDecoration = searchDecoration.copyWith(prefixIcon: Icon(Icons.search)),
super(key: key);