Closed
Description
I am attempting to add an event listener on the window like so:
import 'dart:html';
import 'dart:js_interop';
import 'package:web/web.dart' as js;
void main() {
runApp(const MyApp());
try {
js.window.addEventListener('message', test.toJS);
} catch (e) {
print('there was an err $e');
}
}
void test(Event _) {
print('test invoked');
}
however whenever I try to build my application I get this build error:

I saw someone faced this same issue here #212 (comment) however after trying to replicate their code I still face the same issue
Metadata
Metadata
Assignees
Labels
No labels