以下代码抛出异常"type '([int]) => void' is not a subtype of type 'RequestAnimationFrameCallback' of 'callback'."
import 'dart:html';
void main() {
window.animationFrame.then((time) => print("test"));
}
如果我更改window.animationFrame.then
为window.requestAnimationFrame
,一切都会按预期进行。我是否误解了 Dart 期货的运作方式?