feat: enable IMAP trace logging in debug builds

Sets isLogEnabled=kDebugMode on ImapClient so raw IMAP traffic appears
in the debug console without touching release builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Güttler
2026-04-21 16:20:54 +02:00
co-authored by Claude Sonnet 4.6
parent a27342c7e9
commit 81410c337a
+5 -2
View File
@@ -1,4 +1,5 @@
import 'package:enough_mail/enough_mail.dart';
import 'package:flutter/foundation.dart';
import '../../core/models/account.dart';
@@ -21,8 +22,10 @@ Future<ImapClient> connectImap(
'Unencrypted IMAP connections are not allowed. Enable SSL/TLS.',
);
}
final client =
ImapClient(defaultResponseTimeout: const Duration(seconds: 20));
final client = ImapClient(
defaultResponseTimeout: const Duration(seconds: 20),
isLogEnabled: kDebugMode,
);
await client.connectToServer(account.imapHost, account.imapPort);
await client.login(username, password);
return client;