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