toAscii function

String toAscii(
  1. String hexString
)

Should be called to get ascii from it's hex representation

Implementation

String toAscii(String hexString) {
  ArgumentError.checkNotNull(hexString);

  var start = hexString.startsWith(RegExp('^0x')) ? 2 : 0;
  return String.fromCharCodes(hex.decode(hexString.substring(start)));
}