Returns true if the bytes length of a string str is less than a certain value len.
true
str
len
bool checkStringBytesLen(String str, int len) { final bytes = utf8.encode(str); return bytes.length <= len; }