headerWidthForRange function

double headerWidthForRange(
  1. Range range
)

Get the width of the rows headers given the actual range, this adjusts the size of the header to show larger numbers.

The starting value is kRowHeaderWidth.

Implementation

double headerWidthForRange(Range range) {
  final length = range.end.toString().length;
  final digitOverflow = math.max(length - 3, 0);
  return kRowHeaderWidth + digitOverflow * 8;
}