AutoFlutterLogger class

零侵入性Flutter日志插件主入口

使用方式:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // 基础功能:只需要这一行代码!
  await AutoFlutterLogger.enableAutoLogging();

  runApp(MyApp());
}

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance AutoFlutterLogger
no setter

Static Methods

clearLogs() Future<void>
清理日志文件
disableAutoLogging() Future<void>
禁用自动日志
enableAutoLogging({LoggerConfig? config, List<LoggerExtension>? extensions}) Future<void>
基础启用
exportLogs({DateTime? startDate, DateTime? endDate}) Future<List<File>>
导出日志文件
getCurrentEngine() Future<LoggerEngine>
getStatistics() LoggerStatistics?
获取日志统计信息
logBusinessEvent({required String eventName, Map<String, dynamic>? parameters, String? category}) → void
手动记录业务事件
logButtonEvent({required String buttonText, String? currentPage, Map<String, dynamic>? parameters, String? widgetType}) → void
手动记录按钮点击事件
logPageNaviEvent({required String fromPage, required String toPage, required String routeName, Map<String, dynamic>? arguments, String? navigationType}) → void
手动记录导航事件
pause() → void
暂停日志记录
resume() → void
恢复日志记录
setEventEnabled(LogEventType eventType, bool enabled) → void
启用/禁用特定事件类型
setPrivacyLevel(PrivacyLevel level) → void
设置隐私级别