isBrowser top-level constant

bool const isBrowser

Whether the test is running in a web browser compiled to JavaScript or WebAssembly.

See also:

  • kIsWeb, the equivalent constant in the foundation library.

Implementation

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