From 0ad5e79ea2faa03bd0faba38b5e7a4b29267911d Mon Sep 17 00:00:00 2001 From: Andrew Fulton Date: Mon, 1 Apr 2019 22:44:12 -0500 Subject: [PATCH] [Fix] searchDecoration parameter was null --- lib/country_code_picker.dart | 2 +- lib/selection_dialog.dart | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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);