setUpAnimation method

void setUpAnimation({
  1. required Function tickFunction,
  2. Curve curve = Curves.linear,
})

The main method which provide controller for the animation.

Implementation

void setUpAnimation({required Function tickFunction, Curve curve = Curves.linear}) {
  _tween = Tween<double>(begin: 0, end: 0);
  _animation = _tween.animate(CurvedAnimation(
    parent: _controller,
    curve: curve,
  )) as Animation<double>
    ..addListener(() {
      tickFunction(_animation.value);
    });
}