getHeaderTop method

double getHeaderTop(
  1. int next,
  2. int headerIndex,
  3. TextSpan span
)

Implementation

double getHeaderTop(int next, int headerIndex, TextSpan span) {
  if (next == 0 && headerIndex == 0) return 0;
  if (next == 0) return 0;
  int length = map[headers[next - 1]]!.length;
  double rawLayer = length / crossAxisCount;
  int layer = rawLayer.floor();
  bool isBig = length > (layer * crossAxisCount);
  double itemsHeight = (isBig ? layer + 1 : layer) * boxSize;
  next--;
  double bound =
      headerSize + itemsHeight + getHeaderTop(next, headerIndex, span);
  return bound;
}