diff --git a/packages/smooth_app/lib/pages/onboarding/country_selector.dart b/packages/smooth_app/lib/pages/onboarding/country_selector.dart index 09310a262c5..8d6b8e5a52f 100644 --- a/packages/smooth_app/lib/pages/onboarding/country_selector.dart +++ b/packages/smooth_app/lib/pages/onboarding/country_selector.dart @@ -137,19 +137,15 @@ class _CountrySelectorState extends State { if (mostLikelyUserCountryCode == null) { return countries; } - Country? mostLikelyUserCountry; // Bring the most likely user country to top. for (final Country country in countries) { - if (country.countryCode == mostLikelyUserCountryCode) { - mostLikelyUserCountry = country; - break; + if (country.countryCode.toLowerCase() == + mostLikelyUserCountryCode.toLowerCase()) { + countries.remove(country); + countries.insert(0, country); + return countries; } } - if (mostLikelyUserCountry == null) { - return countries; - } - countries.remove(mostLikelyUserCountry); - countries.insert(0, mostLikelyUserCountry); return countries; } }