jsonFromResponse function
Implementation
Future<Map<String, dynamic>> jsonFromResponse(StreamedResponse rs) async {
final body = await rs.stream.bytesToString();
return body.isEmpty
? <String, dynamic>{}
: jsonDecode(body) as Map<String, dynamic>;
}