update method

void update(
  1. double dt
)

Implementation

void update(double dt) {
  if (_animIsReverse) {
    _controlAnim -= dt * speed;
  } else {
    _controlAnim += dt * speed;
  }

  if (_controlAnim >= pulseVariation) {
    _controlAnim = pulseVariation;
    _animIsReverse = true;
  }
  if (_controlAnim <= 0) {
    _controlAnim = 0;
    _animIsReverse = false;
  }
  value = Curves.decelerate.transform(_controlAnim);
}