Animation constructor

Animation(
  1. [AnimationEffectReadOnly? effect,
  2. AnimationTimeline? timeline]
)

Implementation

factory Animation(
    [AnimationEffectReadOnly? effect, AnimationTimeline? timeline]) {
  if (timeline != null) {
    return Animation._create_1(effect, timeline);
  }
  if (effect != null) {
    return Animation._create_2(effect);
  }
  return Animation._create_3();
}