# AnimationController {{tag>flutter animation controller}} `setState(() {});` 이것 안했다가, 삽질 몇시간을 날려버림... class _AddBookCardState extends State with TickerProviderStateMixin { double bottom = 0; AnimationController animationController; Animation animation; Animation curve; bool mounted = true; @override void initState() { super.initState(); print('_AddBookCardState init ${widget.idx}'); animationController = AnimationController(duration: const Duration(seconds: 2), vsync: this); curve = CurvedAnimation(parent: animationController, curve: Curves.easeOut); animation = Tween(begin: 0, end: 200).animate(curve); animationController.addListener(() { setState(() {}); }); } @override void dispose() { print('_AddBookCardState dispose ${widget.idx}'); animationController?.dispose(); super.dispose(); mounted = false; }