Dart 2.0 with dartdevc

53 views
Skip to first unread message

Tyler Turner

unread,
Mar 14, 2018, 5:19:20 PM3/14/18
to StageXL
I'm trying to get going with the latest dev version of Dart 2.0 and the dartdevc compiler. After updating to 1.3.1+2, my applications compile. Now I'm running into an issue with Mouse listeners. Mousing over a SimpleButton instance gives:

 _js_helper.TypeErrorImplementation.new {message: "Type '(MouseEvent) => void' is not a subtype of type '(Event) => void' in strong mode", Symbol(_error): Error
    at Object.dart.throw (http://localhost:8080/dart_sdk.js:4914:29)
    at Object.dart.castEr…}

I get similar errors when adding a click listener to a Sprite:

_js_helper.TypeErrorImplementation.new {message: "Type '(InputEvent) => void' is not a subtype of type '(Event) => void' in strong mode", Symbol(_error): Error
    at Object.dart.throw (http://localhost:8080/dart_sdk.js:4914:29)
    at Object.dart.castEr…}


Any ideas?

Tyler Turner

unread,
Mar 15, 2018, 12:00:09 PM3/15/18
to StageXL
I didn't realize there was a replacement for pub serve. Using the new build_runner, this just gives a warning, but it still works. 

"Ignoring cast fail from (MouseEvent) => void to (Event) => void"

So I'll just try to use this and see how far I get.

Nils Döhring

unread,
May 9, 2018, 5:55:08 AM5/9/18
to StageXL
Reply all
Reply to author
Forward
0 new messages