File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -344,28 +344,8 @@ class _FormBuilderPhoneFieldState
344344 if (phone.isNotEmpty) {
345345 try {
346346 final parseResult = PhoneNumber .parse (phone);
347- Country ? country;
348-
349347 final isoCode = parseResult.isoCode.name.split ("." ).last;
350-
351- try {
352- country = CountryPickerUtils .getCountryByIsoCode (isoCode);
353- } catch (e) {
354- // ignore
355- }
356-
357- if (country == null ) {
358- try {
359- country = CountryPickerUtils .getCountryByPhoneCode (
360- parseResult.countryCode,
361- );
362- } catch (e) {
363- // ignore
364- }
365- }
366-
367- if (country == null ) throw Exception ('Country not found' );
368-
348+ Country ? country = CountryPickerUtils .getCountryByIsoCode (isoCode);
369349 setState (() {
370350 _selectedDialogCountry = country! ;
371351 });
You can’t perform that action at this time.
0 commit comments