int stringToBytes(String data) { final bytes = utf8.encode(data); final size = Uint8List.fromList(bytes); return size.lengthInBytes; }