kReleaseMode top-level constant

const kReleaseMode = const bool.fromEnvironment('dart.vm.product', defaultValue: false)

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

More specifically, this is a constant that is true if the application was compiled in Dart with the '-Ddart.vm.product=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 release mode, and hence can be removed.

Implementation

const bool kReleaseMode = bool.fromEnvironment('dart.vm.product', defaultValue: false)