animate method

TimelineScene<T> animate(
  1. T property,
  2. {required Animatable tween,
  3. Curve? curve,
  4. Duration shiftBegin = Duration.zero,
  5. Duration shiftEnd = Duration.zero}
)

Specifies a tween for certain property.

The easing curve is inherited from the current scene unless overridden by an alternating curve.

The begin and end time is also taken from the scene but can be fine-tuned by defining shiftBegin and shiftEnd.

Implementation

TimelineScene<T> animate(
  T property, {
  required Animatable tween,
  Curve? curve,
  Duration shiftBegin = Duration.zero,
  Duration shiftEnd = Duration.zero,
}) {
  assert(begin + shiftBegin >= Duration.zero, 'Effective begin must be > 0');
  items.add(_SceneItem(
    property: property,
    tween: tween,
    curve: curve,
    shiftBegin: shiftBegin,
    shiftEnd: shiftEnd,
  ));
  return this;
}