estimateMaxScrollOffset method
- SliverConstraints? constraints,
- int firstIndex,
- int lastIndex,
- double leadingScrollOffset,
- double trailingScrollOffset,
Returns an estimate of the max scroll extent for all the children.
Subclasses should override this function if they have additional information about their max scroll extent.
This is used by SliverMultiBoxAdaptorElement to implement part of the RenderSliverBoxChildManager API.
The default implementation defers to delegate via its SliverChildDelegate.estimateMaxScrollOffset method.
Implementation
double? estimateMaxScrollOffset(
SliverConstraints? constraints,
int firstIndex,
int lastIndex,
double leadingScrollOffset,
double trailingScrollOffset,
) {
assert(lastIndex >= firstIndex);
return delegate.estimateMaxScrollOffset(
firstIndex,
lastIndex,
leadingScrollOffset,
trailingScrollOffset,
);
}