animateToPositionFunction method

void animateToPositionFunction(
  1. double value, {
  2. Duration? duration,
  3. Curve curve = Curves.linear,
})

Animates the widget position to the value. The value must between 0.0 and 1.0 (optional) duration specifies the time for the animation to complete (optional) curve specifies the easing behavior of the animation.

Implementation

void animateToPositionFunction(
  double value, {
  Duration? duration,
  Curve curve = Curves.linear,
}) {
  assert(isAttached, _message);
  assert(0.0 <= value && value <= 1.0);
  _stateMixin!.animateToPosition(value, duration: duration, curve: curve);
}