toBytes method
Returns a copy of the current byte contents of this builder.
Leaves the contents of this builder intact.
Implementation
Uint8List toBytes() {
final result = Uint8List(_length);
var offset = 0;
for (final chunk in _chunks) {
result.setRange(offset, offset + chunk.length, chunk);
offset += chunk.length;
}
return result;
}