maxScrollExtent property
The maximum in-range value for pixels.
The actual pixels value might be outOfRange.
This value is typically greater than or equal to minScrollExtent. It can be infinity, if the scroll is unbounded.
For scrollables that lazily construct their contents, such as ListView.builder, this value can be an estimate that changes as more children are laid out.
Implementation
@override
double get maxScrollExtent {
// Since BouncingScrollPhysics does not allow scrolling when maxScrollExtent is 0,
// it is defined as a value close to zero but not exactly zero, as shown below.
if (physics is BouncingScrollPhysics) {
return max(precisionErrorTolerance, super.maxScrollExtent);
}
return super.maxScrollExtent;
}