countries_list 0.1.3 copy "countries_list: ^0.1.3" to clipboard
countries_list: ^0.1.3 copied to clipboard

outdated

Just list of countries, and that's all (ISO-3166 Country and Dependent Territories Lists with UN Regional Codes). Contains phone codes, flags emoji, alpha1, alpha2 etc. You can use it for creating you [...]

countries_list #

Simply, list of countries. I used json from this repo ISO-3166-Countries-with-Regional-Codes

Main methods: #

// return list of all countries
Future<List<Country>> getCountriesIso();
// return list of all countries which has phone codes
Future<List<Country>> getCountriesOnlyWithPhoneCode();

Country class: #

class Country {
  final String latinName;
  final CountryIso countryIso;
  final String phoneCode;
  final String flag; //emoji flag

  bool contains(String t) {
    try {
      return latinName.toLowerCase().contains(t.toLowerCase()) ||
          phoneCode.toLowerCase().contains(t.toLowerCase()) ||
          countryIso.alpha2.toLowerCase().contains(t.toLowerCase()) ||
          countryIso.alpha3.toLowerCase().contains(t.toLowerCase());
    } catch (error) {
      return false;
    }
  }
}

CountryIso class: #

class CountryIso {
  final String name;
  final String alpha2;
  final String alpha3;
  final String countryCode;
  final String iso31662;
  final Region region;
  final String subRegion;
  final IntermediateRegion intermediateRegion;
  final String regionCode;
  final String subRegionCode;
  final String intermediateRegionCode;
}
0
likes
0
pub points
30%
popularity

Publisher

unverified uploader

Just list of countries, and that's all (ISO-3166 Country and Dependent Territories Lists with UN Regional Codes). Contains phone codes, flags emoji, alpha1, alpha2 etc. You can use it for creating your own country picker.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on countries_list