Answers for "animationcontroller status listener flutter"

0

animationcontroller status listener flutter

AnimationController _controller;
  CurvedAnimation _animation;

  @override
  void initState() {
    super.initState();
    _controller = new AnimationController(
      duration: const Duration(seconds: 5),
      vsync: this,
    )..forward();

    _animation = new CurvedAnimation(
        parent: _controller,
        curve: Curves.linear,
    )..addStatusListener((AnimationStatus status) {
      if (status == AnimationStatus.completed)
        print('completed');
    });
  }
Posted by: Guest on April-18-2021

Code answers related to "animationcontroller status listener flutter"

Browse Popular Code Answers by Language