How do I convert a UTF-8 String into an array of bytes in Dart?
For Dart >1.0 this is now done with the convert library.
import 'dart:convert';
List<int> bytes = utf8.encode("Some data");
print(bytes) //[115, 111, 109, 101, 32, 100, 97, 116, 97]
You need to import dart:utf and use its encodeUtf8 function. There is actually a existing redis client for Dart here which makes use of these functions.