listToHex function
Implementation
String listToHex(List<int> bytes) {
StringBuffer buffer = StringBuffer();
for (int part in bytes) {
if (part & 0xff != part) {
throw const FormatException("Non-byte integer detected");
}
buffer.write('${part < 16 ? '0' : ''}${part.toRadixString(16)}');
}
return buffer.toString();
}