toHexString property

String get toHexString

Converts the number to a hexadecimal (base-16) string representation.

Example:

print(255.toHexString); // Outputs: ff

Implementation

String get toHexString => toInt().toRadixString(16);