hexToAscii static method

String hexToAscii(
  1. String hex
)

Get ascii from the hex value

Implementation

static String hexToAscii(String hex) {
  final List<String> splitted = [];
  for (int i = 0; i < hex.length; i = i + 2) {
    splitted.add(hex.substring(i, i + 2));
  }
  final String asciiText = List.generate(splitted.length,
      (i) => String.fromCharCode(int.parse(splitted[i], radix: 16))).join();
  return asciiText;
}