0
Hero(
                  tag: 'login_hero',
                  child: SizedBox(
                    height: animation.value, //Value is going in -ve
                    child: Image.asset('images/talkup_removebg.png'),
                  ),
                ), //it is also saying that this widget is causing the error

void initState() {
    super.initState();

    controller = AnimationController(duration: const Duration(seconds: 1) ,vsync: this);
    animation = CurvedAnimation(parent: controller, curve: Curves.elasticInOut);

    controller.forward();
    animation.addStatusListener((status) {
      print(status);
    });

    controller.addListener(() {
      setState(() {});
      print(animation.value);
    });
  }

I tried clamp but it is not doing anything. My image is not even showing on the screen since the value is going in negative.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257

0 Answers0