encode static method

String encode(
  1. Uint8List bytes
)

Converts the given bytes to hex string

Implementation

static String encode(Uint8List bytes) {
  var sb = StringBuffer();
  for (var b in bytes) {
    var s = b.toRadixString(16).toUpperCase();
    if (s.length == 1) {
      s = '0$s';
    }
    sb.write(s);
  }
  return sb.toString();
}