kIsWasm top-level constant
A constant that is true if the application was compiled to WebAssembly.
See also:
- defaultTargetPlatform, which is used by themes to find out which platform the application is running on (or, in the case of a web app, which platform the application's browser is running in). Can be overridden in tests with debugDefaultTargetPlatformOverride.
- dart:io.Platform, a way to find out the browser's platform that is not overridable in tests.
Implementation
const bool kIsWasm = bool.fromEnvironment('dart.tool.dart2wasm');