estimateMaxScrollOffset method
- SliverConstraints? constraints,
- int firstIndex,
- int lastIndex,
- double leadingScrollOffset,
- double trailingScrollOffset,
override
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
@override
double estimateMaxScrollOffset(
SliverConstraints? constraints,
int firstIndex,
int lastIndex,
double leadingScrollOffset,
double trailingScrollOffset,
) {
return super.estimateMaxScrollOffset(
constraints,
firstIndex,
lastIndex,
leadingScrollOffset,
trailingScrollOffset,
) ?? gridDelegate.getLayout(constraints!).computeMaxScrollOffset(delegate.estimatedChildCount!);
}