animateSnap method

void animateSnap(
  1. Duration duration, [
  2. Curve curve = Curves.easeInOut
])

Animates the current value to the nearest integer.

Implementation

void animateSnap(Duration duration, [Curve curve = Curves.easeInOut]) {
  _controller.push(
      AnimationRequest(_controller.value.roundToDouble(), duration, curve));
}