Find whether the Flutter application compiled in release mode or not is very important in some cases in flutter development. In my case, I wanted to avoid the Red Screen Of Death by showing a custom error handler widget. But I only want it shown for release builds only. How we find, our app is in release mode? The easiest way is to use kReleaseMode constant in the flutter constants. This constant is true if the application was compiled in release mode. 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. So it's an another advantage of using this constant. Happy Coding!