var animation = elem.animate([{"opacity": 75}, {"opacity": 0}], 200);
var animation = elem.animate([
{"transform": "translate(100px, -100%)"},
{"transform" : "translate(400px, 500px)"}
], 1500);
frames
parameter is an Iterable
timing
paramter can be a double, representing the number of millisecondsTiming
object.@SupportedBrowser(SupportedBrowser.CHROME, '36') Animation animate(Iterable<Map<String, dynamic>> frames, [timing]) { if (frames is! Iterable || !(frames.every((x) => x is Map))) { throw new ArgumentError("The frames parameter should be a List of Maps " "with frame information"); } var convertedFrames; if (frames is Iterable) { convertedFrames = frames.map(convertDartToNative_Dictionary).toList(); } else { convertedFrames = frames; } var convertedTiming = timing is Map ? convertDartToNative_Dictionary(timing) : timing; return convertedTiming == null ? _animate(convertedFrames) : _animate(convertedFrames, convertedTiming); }
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-html/Element/animate.html