isRunningInProfileMode top-level constant
bool
const isRunningInProfileMode
Tells whether the code is running in debug mode (assertions enabled).
If the value is false
, one of the following may be true
:
Example
import 'package:os/os.dart';
void doSomething() {
if (isRunningInProfileMode) {
// ...
} else {
// ...
}
}
See also
Implementation
const bool isRunningInProfileMode = bool.fromEnvironment('dart.vm.profile');