lib/screens/chat_screen.dart
.. .. @@ -1,6 +1,7 @@ 1 1 import 'dart:convert'; 2 2 import 'dart:io'; 3 3 4 +import 'package:flutter/foundation.dart';4 5 import 'package:path_provider/path_provider.dart'; 5 6 6 7 import 'package:flutter/material.dart'; .. .. @@ -36,6 +37,8 @@ 36 37 } 37 38 38 39 Future<void> _chatLog(String msg) async { 40 + debugPrint('[Chat] $msg');41 + if (!kDebugMode) return;39 42 try { 40 43 final dir = await getApplicationDocumentsDirectory(); 41 44 final file = File('${dir.path}/mqtt_debug.log');