SliverGridRegularTileLayout constructor Null safety

const SliverGridRegularTileLayout(
  1. {required int crossAxisCount,
  2. required double mainAxisStride,
  3. required double crossAxisStride,
  4. required double childMainAxisExtent,
  5. required double childCrossAxisExtent,
  6. required bool reverseCrossAxis}
)

Creates a layout that uses equally sized and spaced tiles.

All of the arguments must not be null and must not be negative. The crossAxisCount argument must be greater than zero.

Implementation

const SliverGridRegularTileLayout({
  required this.crossAxisCount,
  required this.mainAxisStride,
  required this.crossAxisStride,
  required this.childMainAxisExtent,
  required this.childCrossAxisExtent,
  required this.reverseCrossAxis,
}) : assert(crossAxisCount != null && crossAxisCount > 0),
     assert(mainAxisStride != null && mainAxisStride >= 0),
     assert(crossAxisStride != null && crossAxisStride >= 0),
     assert(childMainAxisExtent != null && childMainAxisExtent >= 0),
     assert(childCrossAxisExtent != null && childCrossAxisExtent >= 0),
     assert(reverseCrossAxis != null);