hexToBytes static method

Uint8List hexToBytes(
  1. String hexString
)

Implementation

static Uint8List hexToBytes(String hexString) {
  int len = hexString.length;
  Uint8List data = Uint8List(len ~/ 2);
  for (int i = 0; i < len; i += 2) {
    data[i ~/ 2] = (int.parse(hexString.substring(i, i + 2), radix: 16));
  }
  return data;
}