AnimationTimeline constructor

AnimationTimeline({
  1. required List<AnimationTimelineStep> steps,
  2. bool repeat = false,
  3. bool alternate = false,
  4. void onStepStart(
    1. int index,
    2. AnimationTimelineStep step,
    3. TimelineDirection direction
    )?,
  5. void onStepComplete(
    1. int index,
    2. AnimationTimelineStep step,
    3. TimelineDirection direction
    )?,
  6. Object? id,
})

Implementation

AnimationTimeline({
  required List<AnimationTimelineStep> steps,
  this.repeat = false,
  this.alternate = false,
  this.onStepStart,
  this.onStepComplete,
  Object? id,
}) : _steps = List<AnimationTimelineStep>.unmodifiable(steps),
     _id = id ?? Object() {
  if (_steps.isEmpty) {
    throw ArgumentError.value(steps, 'steps', 'must not be empty');
  }
}