반응형
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는 그렇지 않다
반응형
'Flutter' 카테고리의 다른 글
bloc에서 copyWith을 직접만들면 안되는 이유 (0) | 2024.12.30 |
---|---|
flutter gpu 예제 분석 (4) | 2024.09.11 |
Bloc에서 event를 await 하는 방법 (0) | 2024.08.14 |
Child가 Rebuild 되지 않도록 하는 원리 (0) | 2024.07.23 |
위젯트리에서 중간에있는 위젯만 리빌드 하고 싶을 때 (1) | 2024.07.22 |
댓글