fix: preserve animations
This commit is contained in:
@@ -25,6 +25,7 @@ class LinearProgressDialogState extends State<LinearProgressDialog>
|
||||
controller = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
animationBehavior: AnimationBehavior.preserve,
|
||||
);
|
||||
|
||||
_tween = Tween<double>(begin: _target, end: _target);
|
||||
|
||||
@@ -75,6 +75,7 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
||||
_thumbAnimationController = AnimationController(
|
||||
vsync: this,
|
||||
duration: thumbAnimationDuration,
|
||||
animationBehavior: AnimationBehavior.preserve,
|
||||
);
|
||||
|
||||
_thumbAnimation = CurvedAnimation(
|
||||
@@ -85,6 +86,7 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
||||
_labelAnimationController = AnimationController(
|
||||
vsync: this,
|
||||
duration: labelAnimationDuration,
|
||||
animationBehavior: AnimationBehavior.preserve,
|
||||
);
|
||||
|
||||
_labelAnimation = CurvedAnimation(
|
||||
|
||||
@@ -291,9 +291,11 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
|
||||
void initState() {
|
||||
super.initState();
|
||||
_expanded = widget.active;
|
||||
expandController =
|
||||
AnimationController(vsync: this, duration: widget.duration)
|
||||
..addListener(() => setState(() {}));
|
||||
expandController = AnimationController(
|
||||
vsync: this,
|
||||
duration: widget.duration,
|
||||
animationBehavior: AnimationBehavior.preserve,
|
||||
)..addListener(() => setState(() {}));
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -32,6 +32,7 @@ class _SeekBarState extends State<SeekBar> with SingleTickerProviderStateMixin {
|
||||
|
||||
_animationController = AnimationController(
|
||||
vsync: this,
|
||||
animationBehavior: AnimationBehavior.preserve,
|
||||
value: 0,
|
||||
);
|
||||
|
||||
|
||||
@@ -65,10 +65,12 @@ class _PersonGallerySuggestionState extends State<PersonGallerySuggestion>
|
||||
_slideController = AnimationController(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
vsync: this,
|
||||
animationBehavior: AnimationBehavior.preserve,
|
||||
);
|
||||
_fadeController = AnimationController(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
vsync: this,
|
||||
animationBehavior: AnimationBehavior.preserve,
|
||||
);
|
||||
|
||||
_slideAnimation = Tween<Offset>(
|
||||
|
||||
Reference in New Issue
Block a user