How to use animation in Dart?
The following code throws an exception "type '([int]) => void' is not a subtype of type 'RequestAnimationFrameCallback' of 'callback'."
import 'dart:html'; void main() { window.animationFrame.then((time) => print("test")); } If I change window.animationFrame.then to window.requestAnimationFrame , everything will work as expected. I donβt understand how Dart futures work?
Use looks right.
Either you are using an older version that does not yet implement the behavior specified in the documentation, or just an error. I would like to continue and post the question at http://dartbug.com/new