logException method
Implementation
void logException(dynamic error, [StackTrace? stackTrace]) {
final entry = ExceptionLogEntry(error, stackTrace, DateTime.now());
if (_logs.length >= maxLogs) {
_logs.removeAt(0);
}
_logs.add(entry);
_notifyListeners();
// Also print to console for standard debugging
debugPrint('🔴 Exception captured by DevTools: $error');
if (stackTrace != null) {
debugPrintStack(stackTrace: stackTrace);
}
}