You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Docs] Clarify performacne of SingleTickerProviderStateMixin vs TickerProviderStateMixin #164869
It is not clear how large this performance cost is, and I assumed that using one TickerProviderStateMixin three times is more expensive than using threeSingleTickerProviderStateMixins once. Based on a discussion on the Flutter Discord with chunhtai, that may not be the case. I had changed my code to avoid using TickerProviderStateMixin like so:
_animationController =AnimationController.unbounded(vsync:this)
..addListener(() {
_updateScale(_animationController.value);
});
//could have just set `vsync` to `this` if using `TickerProviderStateMixin`WidgetsBinding.instance.addPostFrameCallback((_) {
_verticalAnimationController =AnimationController.unbounded(vsync: _verticalController.position.context.vsync)
..addListener(() {
_verticalController.jumpTo(_verticalAnimationController.value);
});
_horizontalAnimationController =AnimationController.unbounded(vsync: _horizontalController.position.context.vsync)
..addListener(() {
_horizontalController.jumpTo(_horizontalAnimationController.value);
});
});
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Clarify performacne of SingleTickerProviderStateMixin vs TickerProvid…
github-actions commentedon Mar 26, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Clarify performacne of SingleTickerProviderStateMixin vs TickerProvid…