encodeBytes method

Uint8List encodeBytes(
  1. T? value
)

Convenience: encodes into a fresh buffer of exactly encodedSize bytes.

Implementation

Uint8List encodeBytes(T? value) {
  final out = Uint8List(encodedSize);
  write(ByteData.sublistView(out), 0, value);
  return out;
}