kIsWeb top-level constant
A constant that is true if the application was compiled to run on the web.
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 kIsWeb = bool.fromEnvironment('dart.library.js_util');