writeBase64String static method

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

Implementation

static Future<String> writeBase64String(CompoundTag tag,
    [void Function(int)? onWriteListener]) async {
  _io.disposeStream();
  _io = ByteLayer();
  _io.addListener(onWriteListener);
  Tag.writeNamedTag(tag, _io);
  return base64Encoder.encode(_io.bytes);
}