formatBytesAsHexString static method
Returns a hex string by a Uint8List
.
Implementation
static String formatBytesAsHexString(Uint8List bytes) {
var result = StringBuffer();
for (var i = 0; i < bytes.lengthInBytes; i++) {
var part = bytes[i];
result.write('${part < 16 ? '0' : ''}${part.toRadixString(16)}');
}
return result.toString();
}