Calendar header handling animation controller incorrectly
Hello,
It seems that _CalendarHeaderState causes the following exception: flutter error: This widget has been unmounted, so the State no longer has a context (and should be considered defunct)
The fix: 1: Move initialization of _controller to initState(): _controller=AnimationController(duration: _kExpand, vsync: this);
2: Move everything in consctructor to initState() (after setting the _controller):
_monthIndex = monthIndexFromTime(clock.now());
_easeInAnimation =
CurvedAnimation(parent: _controller, curve: Curves.easeIn);
_iconTurns = Tween
HTH :)
It works, thanks a log.
Thanks a lot, it's work