MovementSimulationAnimationController constructor

MovementSimulationAnimationController({
  1. required Offset initialValue,
  2. Offset initialVelocity = Offset.zero,
  3. required MovementSimulationConstructor simulationConstructor,
  4. 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);
}