MovementSimulationAnimationController constructor
MovementSimulationAnimationController({
- required Offset initialValue,
- Offset initialVelocity = Offset.zero,
- required MovementSimulationConstructor simulationConstructor,
- required TickerProvider vsync,
Implementation
MovementSimulationAnimationController({
required Offset initialValue,
Offset initialVelocity = Offset.zero,
required this.simulationConstructor,
required TickerProvider vsync,
}) : _value = initialValue,
lastElapsedDuration = Duration.zero,
_targetValue = initialValue {
_ticker = vsync.createTicker(_tick);
_curSimulation =
simulationConstructor(initialValue, initialVelocity, initialValue);
}