tween<T> method

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

Animates a property and returns the implicitly created scene. The scene can be used to add further properties to the scene or to add further scenes to the movie.

Implementation

MovieScene tween<T>(
  /// Property to animate
  MovieTweenPropertyType property,

  //// Tween that describes the property animation
  Animatable<T> tween, {

  /// Custom curve for this property.
  Curve? curve,

  /// Shift the begin time by this amount.
  Duration shiftBegin = Duration.zero,

  /// Shift the end time by this amount.
  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;
}