precedingScrollExtent property
The scroll extent of all slivers preceding the tree in its viewport,
or 0.0 when isLaidOut is false.
Adding this converts sliver-local y to viewport scroll-space y (and subtracting, the reverse).
Implementation
@override
double get precedingScrollExtent {
// `constraints` is only readable once layout has begun; before the
// first layout there is no preceding extent to speak of.
if (geometry == null) {
return 0.0;
}
return constraints.precedingScrollExtent;
}