decodeRange static method

ByteRange? decodeRange(
  1. Map<String, dynamic> json
)

Decodes a ByteRange from an RPC payload fragment, or null.

Implementation

static ByteRange? decodeRange(Map<String, dynamic> json) {
  final start = Json.optInt(json, 'rangeStart');
  if (start == null) return null;
  return ByteRange(start, Json.optInt(json, 'rangeEnd'));
}