bytesToHex method

String bytesToHex(
  1. List<int> bytes
)

字节转hex字符

Implementation

String bytesToHex(List<int> bytes) {
  return bytes
      .map((byte) => byte.toRadixString(16).padLeft(2, '0').toUpperCase())
      .join();
}