formatOffset static method

String formatOffset(
  1. int offset, {
  2. int width = 8,
})

Format an offset as hex (e.g., 256 -> "00000100")

Implementation

static String formatOffset(int offset, {int width = 8}) {
  return offset.toRadixString(16).padLeft(width, '0').toUpperCase();
}