byteToHexString static method

String byteToHexString(
  1. int value
)

Implementation

static String byteToHexString(int value) {
  assert(value >= 0 && value < 256,
      "Value to decode into Hex String must be in the range of [0,256)");
  var str = value.toRadixString(16);
  if (str.length == 1) {
    str = '0$str';
  }
  return str;
}