getGeometryForChildIndex method
The size and position of the child with the given index.
Implementation
@override
SliverGridGeometry getGeometryForChildIndex(int index) {
if (index == itemCount - 1) {
return SliverGridGeometry(
scrollOffset: (index ~/ crossAxisCount) * mainAxisStride,
crossAxisOffset: 0.0,
mainAxisExtent: childMainAxisExtent,
crossAxisExtent: fullCrossAccessExtent);
}
return super.getGeometryForChildIndex(index);
}