bytesToHexString static method

String bytesToHexString(
  1. Uint8List? bytes
)

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;
}