Rename isProduction to isRelease and update usage
Replaces the isProduction constant with isRelease for clarity and updates its usage in the prepareApp function to ensure debugPrint is disabled only in release mode.
This commit is contained in:
parent
11d46e41f8
commit
1a928b53b4
|
|
@ -37,7 +37,7 @@ show_startup_screen: {{ show_startup_screen }}
|
||||||
startup_screen_message: {{ startup_screen_message }}
|
startup_screen_message: {{ startup_screen_message }}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const bool isProduction = bool.fromEnvironment('dart.vm.product');
|
const bool isRelease = bool.fromEnvironment('dart.vm.product');
|
||||||
|
|
||||||
const assetPath = "app/app.zip";
|
const assetPath = "app/app.zip";
|
||||||
const pythonModuleName = "{{ cookiecutter.python_module_name }}";
|
const pythonModuleName = "{{ cookiecutter.python_module_name }}";
|
||||||
|
|
@ -120,7 +120,7 @@ void main(List<String> args) async {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future prepareApp() async {
|
Future prepareApp() async {
|
||||||
if (!_args.contains("--debug")) {
|
if (!_args.contains("--debug") && isRelease) {
|
||||||
// ignore: avoid_returning_null_for_void
|
// ignore: avoid_returning_null_for_void
|
||||||
debugPrint = (String? message, {int? wrapWidth}) => null;
|
debugPrint = (String? message, {int? wrapWidth}) => null;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue