write static method

int write(
  1. String value,
  2. Uint8List buf
)

Implementation

static int write(String value, Uint8List buf) {
  final list = utf8.encoder.convert(value);
  buf.buffer.asByteData(buf.offsetInBytes).setInt32(0, list.length);
  buf.setAll(4, list);
  return list.length + 4;
}