diff --git a/lib/country_code_picker.dart b/lib/country_code_picker.dart index f395ec5..3727b61 100644 --- a/lib/country_code_picker.dart +++ b/lib/country_code_picker.dart @@ -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, }); diff --git a/lib/selection_dialog.dart b/lib/selection_dialog.dart index 19513cb..0f38ecf 100644 --- a/lib/selection_dialog.dart +++ b/lib/selection_dialog.dart @@ -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);