toRaw method

Uint8List toRaw({
  1. Endian endian = Endian.big,
})

Serializes this Serializable to a Uint8List.

Implementation

Uint8List toRaw({Endian endian = Endian.big}) {
  SerializableOutput ret =
      SerializableOutput(Uint8List(serializedSize), endian: endian);
  serialize(ret);
  if (!ret.done) {
    throw FormatException('${ret.offset}/${ret.buffer.length}');
  }
  return ret.buffer;
}