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:
Feodor Fitsner 2025-11-26 09:55:13 -08:00
parent 11d46e41f8
commit 1a928b53b4
1 changed files with 2 additions and 2 deletions

View File

@ -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 {