Following the official Flutter Wasm documentation (https://docs.flutter.dev/platform-integration/web/wasm) I tried to compile my Flutter Web App for Wasm-support, but constant kIsWasm
returns always false
.
I used Text(kIsWasm ? 'WebAssembly active' : 'WebAssembly inactive')
on my initial Screen to find this out.
What I did already:
3.22.3
flutter create . --platforms=web
flutter build web --wasm
compiles successfully: "ā Built build/web
"dhttpd '--headers=Cross-Origin-Embedder-Policy=credentialless;Cross-Origin-Opener-Policy=same-origin'
false
.Any ideas what I may be doing wrong or what is missing?
This is a flutter bug which is fixed on the main/master channel 3.24.0-1.0.pre.214
already.
https://github.com/flutter/flutter/issues/152089