launchTo method
TickerFuture
launchTo(
- double from,
- double? to, {
- double velocity = 1.0,
- AnimationBehavior? animationBehavior,
Implementation
TickerFuture launchTo(double from, double? to,
{double velocity = 1.0, AnimationBehavior? animationBehavior}) {
double scale = 1.0;
final AnimationBehavior behavior =
animationBehavior ?? this.animationBehavior;
if (SemanticsBinding.instance.disableAnimations) {
switch (behavior) {
case AnimationBehavior.normal:
scale = 200.0;
break;
case AnimationBehavior.preserve:
break;
}
}
final Simulation simulation =
SpringSimulation(_springDescription, from, to!, velocity * scale)
..tolerance = _kFlingTolerance;
return animateWith(simulation);
}