listCountries method

Future<CountryList> listCountries()

List countries

List of all countries. You can use the locale header to get the data in a supported language.

Implementation

Future<models.CountryList> listCountries() async {
  final String apiPath = '/locale/countries';

  final Map<String, dynamic> apiParams = {};

  final Map<String, String> apiHeaders = {
    'content-type': 'application/json',
  };

  final res = await client.call(HttpMethod.get,
      path: apiPath, params: apiParams, headers: apiHeaders);

  return models.CountryList.fromMap(res.data);
}