getMinChildIndexForScrollOffset method
- @override
override
The minimum child index that is visible at the given scroll offset.
This function is given the itemExtent
as an argument to avoid
recomputing itemExtent
repeatedly during layout.
By default, returns a value consistent with the children being placed in order, without gaps, starting from layout offset zero.
Implementation
@override
int getMinChildIndexForScrollOffset(double scrollOffset, double itemExtent) {
return super.getMinChildIndexForScrollOffset(math.max(scrollOffset - _padding, 0.0), itemExtent);
}