diff --git a/lib/country_code_picker.dart b/lib/country_code_picker.dart index 6e48144..68f203b 100644 --- a/lib/country_code_picker.dart +++ b/lib/country_code_picker.dart @@ -45,10 +45,8 @@ class _CountryCodePickerState extends State { initState() { if (widget.initialSelection != null) { selectedItem = elements.firstWhere( - (e) { - e.code.toUpperCase() == widget.initialSelection.toUpperCase() || - e.dialCode == widget.initialSelection.toString(); - }, + (e) => (e.code.toUpperCase() == widget.initialSelection.toUpperCase()) || + (e.dialCode == widget.initialSelection.toString()), orElse: () => elements[0]); } else { selectedItem = elements[0];