kProfileMode top-level constant

const kProfileMode = const bool.fromEnvironment('dart.vm.profile', defaultValue: false)

A constant that is true if the application was compiled in profile mode.

More specifically, this is a constant that is true if the application was compiled in Dart with the '-Ddart.vm.profile=true' flag.

Since this is a const value, it can be used to indicate to the compiler that a particular block of code will not be executed in profle mode, an hence can be removed.

Implementation

const bool kProfileMode = bool.fromEnvironment('dart.vm.profile', defaultValue: false)