Uint8List.fromList(…)将 List< int> 转换为 Uint8List
String.fromCharCodes(…)转换 List< int> 或 Uint8List 到 String
List<int> list = 'xxx'.codeUnits;
Uint8List bytes = Uint8List.fromList(list);
String string = String.fromCharCodes(bytes);
List<int> list = 'xxx'.codeUnits;
Uint8List bytes = Uint8List.fromList(list);
String string = String.fromCharCodes(bytes);
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
You can find more information in our Privacy Policy and .