hexToBytes function

List<int> hexToBytes(
  1. String hex
)

Implementation

List<int> hexToBytes(String hex) {
  var result = <int>[];
  for (var i = 0; i < hex.length; i += 2) {
    var byte = int.parse(hex.substring(i, i + 2), radix: 16);
    result.add(byte);
  }
  return result;
}