getCountries function
This function returns list of countries
Implementation
Future<List<Country>> getCountries(BuildContext context) async {
String rawData = await DefaultAssetBundle.of(context).loadString(
'packages/country_calling_code_picker/raw/country_codes.json');
final parsed = json.decode(rawData.toString()).cast<Map<String, dynamic>>();
return parsed.map<Country>((json) => new Country.fromJson(json)).toList();
}