hex static method

String hex(
  1. int n
)

Implementation

static String hex(int n) {
  String hex = (n & 0xFF).toRadixString(16);
  if (hex.length < 2) {
    hex = '0' + hex;
  }
  return hex.toUpperCase();
}