addTween method Null safety

Tween addTween(
  1. TweenObject tweenObject,
  2. num time,
  3. [TransitionFunction transition = Transition.linear]
)

This is a convenience method that creates a Tween and adds it to this juggler. See Tween for more details.

Example:

// Animate the x and y properties of the spaceship.
var tween = juggler.addTween(spaceship, 2.0, Transition.linear);
tween.animate.x.to(100);
tween.animate.y.to(200);

Implementation

Tween addTween(TweenObject tweenObject, num time,
    [TransitionFunction transition = Transition.linear]) {
  final tween = Tween(tweenObject, time, transition);
  add(tween);
  return tween;
}