current property
DVModuleEnvironment
get
current
The environment this code was compiled for.
Decided at compile time, from the libraries the platform has: a browser
build has dart:js_interop, a Flutter client has dart:ui, and the
backend has neither.
Implementation
static DVModuleEnvironment get current {
if (const bool.fromEnvironment('dart.library.js_interop')) return web;
if (const bool.fromEnvironment('dart.library.ui')) return native;
return backend;
}