toMutableByteData method

ByteData toMutableByteData()

Returns a mutable encoding of this value.

Implementation

ByteData toMutableByteData() {
  final capacity = encodeSelfCapacity();
  final writer = new RawWriter.withCapacity(capacity);
  encodeSelf(writer);
  return writer.toByteDataView();
}