countries_list

Creator: coderz1093

Last updated:

0 purchases

countries_list Image
countries_list Images

Languages

Categories

Add to Cart

Description:

countries list

countries_list #
These lists are the result of parsing json data from this repo ISO-3166-Countries-with-Regional-Codes
Main methods: #
// return list of all countries
Future<List<Country>> getCountriesIso();
copied to clipboard
// return list of all countries which has phone codes
Future<List<Country>> getCountriesOnlyWithPhoneCode();
copied to clipboard
Country class: #
class Country {
final String latinName;
final CountryIso countryIso;
final String phoneCode;
final String flag;

// for search
bool contains(String t) {
try {
return latinName?.toLowerCase()?.contains(t.toLowerCase()) == true ||
phoneCode?.toLowerCase()?.contains(t.toLowerCase()) == true ||
countryIso?.alpha2?.toLowerCase()?.contains(t.toLowerCase()) ==
true ||
countryIso?.alpha3?.toLowerCase()?.contains(t.toLowerCase()) == true;
} catch (error) {
return false;
}
}
}
copied to clipboard
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;
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.