runOnElement method

Animation runOnElement(
  1. Element element
)

Runs this animation on the provided element.

Implementation

html.Animation runOnElement(final html.Element element) {
  return element.animate(
    keyframes.map((final keyframe) => keyframe.toMap()),
    {
      'duration': duration.inMilliseconds,
      'delay': startDelay.inMilliseconds,
      'endDelay': endDelay.inMilliseconds,
      'easing': '$easing',
      'direction': '$direction',
      'fill': '$fillMode',
      'iterations': iterations,
    },
  );
}