Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # AnimationController {{tag>flutter animation controller}} `setState(() {});` 이것 안했다가, 삽질 몇시간을 날려버림... <code dart> class _AddBookCardState extends State<AddBookCard> with TickerProviderStateMixin { double bottom = 0; AnimationController animationController; Animation<double> 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<double>(begin: 0, end: 200).animate(curve); animationController.addListener(() { setState(() {}); }); } @override void dispose() { print('_AddBookCardState dispose ${widget.idx}'); animationController?.dispose(); super.dispose(); mounted = false; } </code> open/animationcontroller.txt Last modified: 2024/10/05 06:15by 127.0.0.1