getCases static method

Future<CovidCases> getCases()

Get the current COVID cases of germany.

Returns null if the api request failed. To get info about specific states and disctricts use RKICovidAPI.getStates() or RKICovidAPI.getDisctricts().

To get the current cases:

var statsGermany = await RKICovidAPI.getCases();

print(statsGermany.deaths.toSring());

Implementation

static Future<CovidCases> getCases() async {
  var resultMap = await (_responseAsMap(_generalUrl));
  return CovidCases.fromJson(resultMap as Map<String, dynamic>);
}