generateLabelForIndex function

String generateLabelForIndex(
  1. Axis axis,
  2. int index
)

Generates a header label given an axis and a header index.

See also:

  • numericLabelGenerator and alphabetLabelGenerator that are celled here for vertical and horizontal axis, respectively

Implementation

String generateLabelForIndex(Axis axis, int index) {
  final generator = axis == Axis.horizontal
      ? _alphabetLabelGenerator
      : _numericLabelGenerator;
  return generator(index);
}