Open kmmk42000 opened 3 months ago
In method performLayout(), set targetStartScrollOffset = constraints.scrollOffset + constraints.cacheOrigin
final double targetStartScrollOffset = constraints.scrollOffset + constraints.cacheOrigin; final double targetEndScrollOffset = targetStartScrollOffset + constraints.remainingCacheExtent;
but In method removeOutOfScopeElements(), set cacheExtent = viewportHeight without constraints.cacheOrigin.
void removeOutOfScopeElements(double scrollOffset, double viewportHeight) { double cacheExtent = viewportHeight; double startOffset = scrollOffset - cacheExtent; if (startOffset < 0) { startOffset = 0; } double endOffset = scrollOffset + viewportHeight + cacheExtent; }
I wanna know why not using constraints.cacheOrigin In method removeOutOfScopeElements()?
In method performLayout(), set targetStartScrollOffset = constraints.scrollOffset + constraints.cacheOrigin
but In method removeOutOfScopeElements(), set cacheExtent = viewportHeight without constraints.cacheOrigin.
I wanna know why not using constraints.cacheOrigin In method removeOutOfScopeElements()?