bytesToHexString static method
Convert bytes to HexString, return a string of length 0 when bytes is null/of length 0
Implementation
static String bytesToHexString(Uint8List? bytes) {
if (bytes == null) {
return "";
}
String hex = "";
for (var n = 0; n < bytes.length; n++) {
hex += byteToHexString(bytes[n]);
}
return hex;
}