Flutter
연속적인 애니메이션을 만드는 방법
붕어사랑 티스토리
2024. 8. 22. 15:36
반응형
1. Interval을 이용하는 방법
CurvedAnimation을 만들 때 Interval값을 주면 Parent 의 애니메이션 기간에 어떤 부분에서 애니메이션이 실행되고 종료될 지 결정할 수 있다.
2. TweenSequence를 이용하는 방법
https://api.flutter.dev/flutter/animation/TweenSequence-class.html
TweenSequence class - animation library - Dart API
Enables creating an Animation whose value is defined by a sequence of Tweens. Each TweenSequenceItem has a weight that defines its percentage of the animation's duration. Each tween defines the animation's value during the interval indicated by its weight.
api.flutter.dev
연속적인 애니메이션을 실행하는 방법. Weight 이라는 변수로 비율을 조절한다.
차이점
Interval은 구간을 겹칠 수 있고, Sequence는 그렇지 않다
반응형