File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
packages/flutter/lib/src/foundation Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1- edd8546116457bdf1c5bdfb13ecb9463d2bb5ed4
1+ 235db911ba279722f5e685f38b0ed30fa7e8570a
Original file line number Diff line number Diff line change @@ -78,3 +78,15 @@ const double precisionErrorTolerance = 1e-10;
7878/// * [dart:io.Platform] , a way to find out the browser's platform that is not
7979/// overridable in tests.
8080const bool kIsWeb = bool .fromEnvironment ('dart.library.js_util' );
81+
82+ /// A constant that is true if the application was compiled to WebAssembly.
83+ ///
84+ /// See also:
85+ ///
86+ /// * [defaultTargetPlatform] , which is used by themes to find out which
87+ /// platform the application is running on (or, in the case of a web app,
88+ /// which platform the application's browser is running in). Can be overridden
89+ /// in tests with [debugDefaultTargetPlatformOverride] .
90+ /// * [dart:io.Platform] , a way to find out the browser's platform that is not
91+ /// overridable in tests.
92+ const bool kIsWasm = bool .fromEnvironment ('dart.tool.dart2wasm' );
You can’t perform that action at this time.
0 commit comments