bodyFrom<R> function

Result<R> bodyFrom<R>(
  1. String str
)

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,
  );
}