prefixHex static method

String prefixHex(
  1. String hex
)

Implementation

static String prefixHex(String hex) {
  if (hex.startsWith(RegExp('^0[xX]'))) return hex;
  return "0x" + hex;
}