TF-1912 Only trigger log when debug logs are enabled

(cherry picked from commit 949034a80238ac8a30d65ae3c5020acc5240ef00)
This commit is contained in:
dab246
2023-07-18 11:43:21 +07:00
committed by Dat Vu
parent 21621c0705
commit 37334d3c66
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -6,9 +6,9 @@ import 'package:flutter/material.dart';
final logHistory = _Dispatcher("");
void log(String? value) {
String v = value ?? "";
logHistory.value = "$v\n${logHistory.value}";
if (kDebugMode) {
String v = value ?? "";
logHistory.value = "$v\n${logHistory.value}";
print(v);
}
}