getContentBytes method
The body as UTF-8 bytes: the bytes of contentBytes, or a String
body encoded. Null when the body is not text, eg. JSON or a file.
res.getContentBytes();
Implementation
Uint8List? getContentBytes() {
Uint8List? bytes = _textBytes;
if (bytes != null) return bytes;
dynamic content = _contentData;
return content is String ? utf8Bytes(content) : null;
}