add method

  1. @override
Future<void> add(
  1. Uint8List bytes
)
override

Appends bytes to the sink.

Throws ArchiveClosedException if the sink is closed.

Implementation

@override
Future<void> add(Uint8List bytes) => _synchronized(() async {
  if (_closed) {
    throw ArchiveClosedException('add(${bytes.length}) after close()');
  }
  await _file.writeFrom(bytes);
  _length += bytes.length;
});