我的 main.dart 文件如下所示:
import 'dart:html';
import 'package:stagexl/stagexl.dart' as stageXL;
void main() {
CanvasElement canvas = querySelector("#canvas");
stageXL.Stage stage = new stageXL.Stage(canvas, width: 300, height: 400);
stageXL.RenderLoop renderLoop = new stageXL.RenderLoop();
renderLoop.addStage(stage);
}
但是在pub serve
之后并在dartium中运行index.html我得到了
Internal error: 'package:stagexl/src/events/event_dispatcher.dart': error:
line 43 pos 20: unexpected token '<'
EventStream<T> on<T extends Event>(String eventType) {
^
错误。我做错了什么?