humanizeHex function

String humanizeHex(
  1. int number, {
  2. bool uppercase = true,
})

Formats a number as a hexadecimal string (e.g., FF).

Implementation

String humanizeHex(int number, {bool uppercase = true}) {
  final hex = number.toRadixString(16);
  return uppercase ? hex.toUpperCase() : hex;
}