takeBytes method

Uint8List takeBytes()

Returns the bytes currently contained in this builder and clears it.

The returned list may be a view of a larger buffer.

Implementation

Uint8List takeBytes() {
  final result = toBytes();
  clear();
  return result;
}