INNER CODE UNIT · Dart
targetLeadingOffset
fluttercandies/flutter_scrollview_observer · lib/src/common/observer_controller.dart:703
var targetLeadingOffset = childLayoutOffset - sliverSize;
if (targetLeadingOffset < 0) {
targetLeadingOffset = 0;
}
double prevPageOffset = targetLeadingOffset + precedingScrollExtent;
prevPageOffset = prevPageOffset < 0 ? 0 : prevPageOffset;
// The offset of this page turning is the same as the previous one,
// which means the [index] is wrong.
if (lastPageTurningOffset == prevPageOffset) {
Log.warning('The child corresponding to the index cannot be found.\n'
'Please make sure the index is correct.');
_handleScrollInterruption(context: ctx, completer: completer);
return;
}
lastPageTurningOffset = prevPageOffset;
final prevPageOffsetRectified = prevPageOffset.rectify(obj);
if (isAnimateTo) {
await _controller.animateTo(