Uint8List createUint8ListFromString(String s) { var ret = Uint8List(s.length); for (var i = 0; i < s.length; i++) { ret[i] = s.codeUnitAt(i); } return ret; }