bytesToHexString static method

String bytesToHexString(
  1. Uint8List? bytes
)

Converts bytes to hex string, returns an empty string when bytes is null or empty.

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