snapToPosition method

void snapToPosition(
  1. double endValue, {
  2. double? startValue,
})

Implementation

void snapToPosition(double endValue, {double? startValue}) {
  final Simulation simulation = SpringSimulation(
    SpringDescription.withDampingRatio(
      mass: 1.0,
      stiffness: 600.0,
      ratio: 1.1,
    ),
    startValue ?? panelController.value.factor,
    endValue,
    0,
  );
  _animationController.animateWith(simulation);
}