animate method

  1. @SupportedBrowser(SupportedBrowser.CHROME, '36')
Animation animate(
  1. Iterable<Map<String, dynamic>> frames, [
  2. dynamic timing
])

Creates a new AnimationEffect object whose target element is the object on which the method is called, and calls the play() method of the AnimationTimeline object of the document timeline of the node document of the element, passing the newly created AnimationEffect as the argument to the method. Returns an Animation for the effect.

Examples

var animation = elem.animate([{'opacity': 75}, {'opacity': 0}], 200);

var animation = elem.animate([
  {'transform': 'translate(100px, -100%)'},
  {'transform' : 'translate(400px, 500px)'}
], 1500);

The frames parameter is an Iterable

Implementation

@SupportedBrowser(SupportedBrowser.CHROME, '36')
Animation animate(Iterable<Map<String, dynamic>> frames, [timing]) {
  return Animation();
}