void initState()

in packages/diagrams/lib/src/tween_sequence.dart [38:72]


  void initState() {
    super.initState();
    _controller =
        AnimationController(vsync: this, duration: _kAnimationDuration);
    Timer(_kBreakDuration, () {
      _controller.forward();
    });
    _controller
      ..addStatusListener((AnimationStatus status) {
        switch (status) {
          case AnimationStatus.dismissed:
          case AnimationStatus.forward:
          case AnimationStatus.reverse:
            break;
          case AnimationStatus.completed:
            Timer(_kBreakDuration, () {
              _controller.reverse();
            });
            break;
        }
      })
      ..addListener(() {
        if (_controller.value == 1.0 || _controller.value == 0.0) {
          _activeItem = 0;
        } else if (_controller.value < 0.4) {
          _activeItem = 1;
        } else if (_controller.value < 0.6) {
          _activeItem = 2;
        } else if (_controller.value < 1.0) {
          _activeItem = 3;
        } else {
          assert(false);
        }
      });
  }