If you want to remove something from code in flutter in different modes you have different constants:
kDebugMode– true if app is in debug mode otherwise falsekReleaseMode– true if app is in release mode otherwise falsekProfileMode– true if app is in profile mode otherwise false
And then you can use it like that:
if (kDebugMode) {
// some code
}
so compiler remove this unused code in other modes.