getMaxChildIndexForScrollOffset method
Implementation
@protected
int getMaxChildIndexForScrollOffset(double scrollOffset, double itemExtent) {
if (itemExtent > 0.0) {
final double actual = scrollOffset / itemExtent - 1;
final int round = actual.round();
if (_isWithinPrecisionErrorTolerance(actual, round)) {
return math.max(0, round);
}
return math.max(0, actual.ceil());
}
return 0;
}