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 {
  const String path = '/locale/countries';

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

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

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

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