getStatesOfCountry function
Get the list of states that belongs to a country by the country ISO CODE
Implementation
Future<List<State>> getStatesOfCountry(String countryCode) async {
final states = await _loadStates();
final res = states.where((state) {
return state.countryCode == countryCode;
}).toList();
res.sort((a, b) => a.name.compareTo(b.name));
return res;
}