write static method

Future<void> write(
  1. String file,
  2. CompoundTag tag, [
  3. void onWriteListener(
    1. int
    )?
])

Implementation

static Future<void> write(String file, CompoundTag tag,
    [void Function(int)? onWriteListener]) async {
  _io.disposeStream();
  _io = ByteLayer();
  _io.addListener(onWriteListener);

  Tag.writeNamedTag(tag, _io);
  await _io.writeToFile(file);
}