From f8850a9be806d5f7ca78fa7e183b6477c645aa2c Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Mon, 15 Dec 2025 18:22:56 -0800 Subject: [PATCH] Enable debugPrint suppression in release mode Uncommented the line that suppresses debugPrint output when not in debug mode and in release builds. Also updated socket address generation to use a temporary storage path from environment variables for non-TCP output. --- {{cookiecutter.out_dir}}/lib/main.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.out_dir}}/lib/main.dart b/{{cookiecutter.out_dir}}/lib/main.dart index a619577..2561b3d 100644 --- a/{{cookiecutter.out_dir}}/lib/main.dart +++ b/{{cookiecutter.out_dir}}/lib/main.dart @@ -122,7 +122,7 @@ void main(List args) async { Future prepareApp() async { if (!_args.contains("--debug") && isRelease) { // ignore: avoid_returning_null_for_void - //debugPrint = (String? message, {int? wrapWidth}) => null; + debugPrint = (String? message, {int? wrapWidth}) => null; } else { _args.remove("--debug"); } @@ -222,7 +222,7 @@ Future runPythonApp(List args) async { 'Python output TCP Server is listening on port ${outSocketServer.port}'); socketAddr = "$tcpAddr:${outSocketServer.port}"; } else { - socketAddr = "stdout_$pid.sock"; + socketAddr = path.join(environmentVariables["FLET_APP_STORAGE_TEMP"], "stdout_$pid.sock"); if (await File(socketAddr).exists()) { await File(socketAddr).delete(); }