callTask method
void
callTask({})
override
Implementation
@override
void callTask({
required double overOffset,
Duration? duration,
Curve curve = Curves.linear,
}) {
if (modeLocked || noMoreLocked || secondaryLocked || !_canProcess) {
return;
}
final to = _position.maxScrollExtent + actualTriggerOffset + overOffset;
_releaseOffset = actualTriggerOffset + overOffset;
(_position as ScrollPosition).jumpTo(_position.maxScrollExtent);
if (clamping) {
if (duration == null) {
_offset = actualTriggerOffset + overOffset;
_mode = IndicatorMode.ready;
_updateBySimulation(_position, 0);
} else {
userOffsetNotifier.value = true;
_clampingAnimationController!
.animateTo(to, duration: duration, curve: curve)
.then((value) {
userOffsetNotifier.value = false;
_updateBySimulation(_position, 0);
});
}
} else {
if (_position is ScrollPosition) {
if (duration == null) {
(_position as ScrollPosition).jumpTo(to);
} else {
userOffsetNotifier.value = true;
(_position as ScrollPosition)
.animateTo(to, duration: duration, curve: curve)
.then((value) => userOffsetNotifier.value = false);
}
}
}
}