Move animation curves into a Curves namespace
This commit is contained in:
@@ -67,14 +67,14 @@ class TestBed extends NodeWithSize {
|
||||
|
||||
// Animate obstacle
|
||||
ActionSequence seq = new ActionSequence([
|
||||
new ActionTween((a) => _obstacle.position = a, new Point(256.0, 800.0), new Point(768.0, 800.0), 1.0, easeInOut),
|
||||
new ActionTween((a) => _obstacle.position = a, new Point(768.0, 800.0), new Point(256.0, 800.0), 1.0, easeInOut)
|
||||
new ActionTween((a) => _obstacle.position = a, new Point(256.0, 800.0), new Point(768.0, 800.0), 1.0, Curves.easeInOut),
|
||||
new ActionTween((a) => _obstacle.position = a, new Point(768.0, 800.0), new Point(256.0, 800.0), 1.0, Curves.easeInOut)
|
||||
]);
|
||||
_obstacle.actions.run(new ActionRepeatForever(seq));
|
||||
|
||||
seq = new ActionSequence([
|
||||
new ActionTween((a) => _obstacle.scale = a, 1.0, 2.0, 2.0, easeInOut),
|
||||
new ActionTween((a) => _obstacle.scale = a, 2.0, 1.0, 2.0, easeInOut)
|
||||
new ActionTween((a) => _obstacle.scale = a, 1.0, 2.0, 2.0, Curves.easeInOut),
|
||||
new ActionTween((a) => _obstacle.scale = a, 2.0, 1.0, 2.0, Curves.easeInOut)
|
||||
]);
|
||||
_obstacle.actions.run(new ActionRepeatForever(seq));
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ class ProgressIndicatorAppState extends State<ProgressIndicatorApp> {
|
||||
..variable = new AnimatedValue<double>(
|
||||
0.0,
|
||||
end: 1.0,
|
||||
curve: new Interval(0.0, 0.9, curve: ease),
|
||||
reverseCurve: ease
|
||||
curve: new Interval(0.0, 0.9, curve: Curves.ease),
|
||||
reverseCurve: Curves.ease
|
||||
);
|
||||
valueAnimation.addStatusListener((PerformanceStatus status) {
|
||||
if (status == PerformanceStatus.dismissed || status == PerformanceStatus.completed)
|
||||
|
||||
Reference in New Issue
Block a user