fitGridSection function

RenderFitGridSection fitGridSection({
  1. int index = 0,
})

The painted section behind a grid.

Pass index to disambiguate when a test pumps more than one grid.

Implementation

RenderFitGridSection fitGridSection({int index = 0}) {
  final sections = fitGridSections();
  if (index < 0 || index >= sections.length) {
    throw StateError(
      'No FitGrid section at index $index; ${sections.length} are mounted. '
      'A grid with no rows paints no section, so check the grid is not '
      'showing its empty state.',
    );
  }
  return sections[index];
}