statusListener method

dynamic statusListener(
  1. dynamic status
)

Implementation

statusListener(status) {
  if (status == AnimationStatus.completed) {
    timers.add(
      Timer(
        widget.waitDuration ?? Duration(seconds: widget.wait ?? 5),
        () => {
          setState(() {
            _currentIndex = (_currentIndex + 1) % widget.strings.length;
            _animationController.reset();
            _animationController.forward();
          })
        },
      ),
    );
  }
}