strToByteString method
String to byte string helper.
Implementation
typed.Uint8Buffer strToByteString(String str) {
final buff = typed.Uint8Buffer();
const utf = convertor.Utf8Encoder();
final List<int> codes = utf.convert(str);
buff.addAll(codes);
return buff;
}