Make FadeTransition more efficient (#14155)

* Make FadeTransition more efficient

* Update fade_transition_test.dart

* Update proxy_box.dart
This commit is contained in:
Ian Hickson
2018-01-18 20:22:22 -08:00
committed by GitHub
parent 3ac9449ad4
commit bed71b9a15
8 changed files with 201 additions and 32 deletions

View File

@@ -152,8 +152,8 @@ class _BottomNavigationDemoState extends State<BottomNavigationDemo>
// We want to have the newly animating (fading in) views on top.
transitions.sort((FadeTransition a, FadeTransition b) {
final Animation<double> aAnimation = a.listenable;
final Animation<double> bAnimation = b.listenable;
final Animation<double> aAnimation = a.opacity;
final Animation<double> bAnimation = b.opacity;
final double aValue = aAnimation.value;
final double bValue = bAnimation.value;
return aValue.compareTo(bValue);