Explicitly specify linear curves (#3973)

We now required the curve parameter for CurvedAnimation.
This commit is contained in:
Adam Barth 2016-05-17 11:15:58 -07:00
parent d6548133ce
commit e9fe39e5e5
2 changed files with 3 additions and 1 deletions

View File

@ -384,6 +384,7 @@ class _PopupMenuRoute<T> extends PopupRoute<T> {
Animation<double> createAnimation() {
return new CurvedAnimation(
parent: super.createAnimation(),
curve: Curves.linear,
reverseCurve: new Interval(0.0, _kMenuCloseIntervalEnd)
);
}

View File

@ -46,7 +46,8 @@ abstract class RenderToggleable extends RenderConstrainedBox implements Semantic
value: _value ? 1.0 : 0.0
);
_position = new CurvedAnimation(
parent: _positionController
parent: _positionController,
curve: Curves.linear
)..addListener(markNeedsPaint)
..addStatusListener(_handlePositionStateChanged);