getCrossAxisCount method
Returns the number of children than can be layout in the cross axis.
Implementation
@override
int getCrossAxisCount(
SliverConstraints constraints,
double crossAxisSpacing,
) {
return (constraints.crossAxisExtent /
(maxCrossAxisExtent + crossAxisSpacing))
.ceil();
}