AnimationController
setState(() {});
이것 안했다가, 삽질 몇시간을 날려버림…
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; }
관련 문서
Plugin Backlinks: 아무 것도 없습니다.