writeString method
Implementation
void writeString(String? string, {Encoding encoding = utf8}) {
if (string == null) {
writeNil();
return;
}
Uint8List encodedString = encoding.encode(string) as Uint8List;
writeStringHeader(encodedString.length);
_bytesBuilder.add(encodedString);
}