kIsBrowser top-level constant

bool const kIsBrowser

Whether the code is running in a browser environment.

true when compiled to JavaScript, false on the Dart VM.

Implementation

const bool kIsBrowser = bool.fromEnvironment('dart.library.js_interop');