dataBytes property

Uint8List? get dataBytes

The response body as raw bytes.

Decodes base64 when isBinary; otherwise UTF-8 encodes the text data. Returns null when there is no data.

Implementation

Uint8List? get dataBytes {
  final d = data;
  if (d == null) return null;
  return isBinary ? base64.decode(d) : Uint8List.fromList(utf8.encode(d));
}