Closed Trung15010802 closed 1 week ago
I don't see a way that Win32 API access could possibly work from within the WASM sandbox.
What are you expecting to be able to do here?
FWIW there is something strange going on, I can't quite wrap my mind around it.
TL;DR:
Full notes:
import 'package:telosnex/extensions/win32/win32_stub.dart'
if (dart.library.io) 'package:telosnex/extensions/win32/win32_io.dart'
if (dart.library.html) 'package:telosnex/extensions/win32/win32_web.dart';
to
import 'package:telosnex/extensions/win32/win32_stub.dart'
if (dart.library.js_interop) 'package:telosnex/extensions/win32/win32_web.dart'
if (dart.library.io) 'package:telosnex/extensions/win32/win32_io.dart';
(note precedence, putting js_interop first, as well as using js_interop instead of HTML)
This didn't work. But, removing that code altogether didn't work. I'm guessing a package I depend on depends on win32 and has the "wrong" type of conditional import that either needs to be patched, or will work after stable gets the fix.
I was just trying WASM compile, expecting it not to work, so I'm not actively pursuing this. Especially with the state being confusing to me before Flutter updates shortly.
But I figured I should give you a heads up, w/full context, in case you see more issues reported (I see in vector_graphics and flutter threads, win32 is also mentioned, so you might see more)
I got this error when build flutter with Wasm![image](https://github.com/dart-windows/win32/assets/90593296/2e855127-6817-49c6-bcbb-204302ca1896)