Animation 构造函数

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

实现

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();
}