bodyFrom<R> function
Implementation
Result<R> bodyFrom<R>(String str) {
final body = json.decode(str) as Map<String, dynamic>;
final R obj = _decode(body['data']);
return Result<R>(
obj,
code: body['code'] ?? -1,
);
}