toColonHex method

String toColonHex()

Returns a colon-separated hex representation of this integer.

Implementation

String toColonHex() {
  return toRadixString(16)
      .padLeft(8, '0')
      .replaceAllMapped(RegExp(r'(..)'), (match) => ':${match[1]}');
}