done method
Finalize and return the written ByteData.
Implementation
ByteData done() {
if (_isDone) {
throw StateError(
'done() must not be called more than once on the same VectorGraphicsBuffer.');
}
final ByteData result = Uint8List.fromList(_buffer).buffer.asByteData();
_buffer = <int>[];
_isDone = true;
return result;
}