Country.code2Letters constructor
Country.code2Letters(
- String code2Letters
Implementation
factory Country.code2Letters(String code2Letters) {
if (code2Letters.isNotEmpty &&
countriesFrench.keys.any((element) => element == code2Letters) ==
false) {
throw 'unknown country';
} else if (code2Letters.isEmpty) {
return Country.emptyCountry;
} else {
return Country._(code2Letters);
}
}