getBytes method

Uint8List getBytes()

Implementation

Uint8List getBytes() {
  if (_type == 'link' || _type == 'file_id') {
    throw PaperPlaneException(description: "Can't export as Bytes.");
  } else if (_type == 'file') {
    return (_content as io.File).readAsBytesSync();
  } else {
    return _content as Uint8List;
  }
}