LogViewerController class

日志查看器控制器:attach 挂球 / detach 卸球,showBall / hideBall 控制球 可见性,stream 暴露桥接广播流(面板路由注入用)。

生命周期:attach 创建共享 ViewerBridgeOutput 并 addOutput 注册进 顶层单例 logCollector(此后全部分发条目实时广播);detach 移除球与 桥接输出器并关闭桥接流(关闭后 collector 不再向其分发)。球以 OverlayEntry 插入 navigatorKey 对应 Navigator 的根 Overlay——面板 打开期间 hideBall(置顶的球会压在路由之上,属体验项)。

全静态实现(工具定位,进程内单球);不构造实例。

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

stream → Stream<LogEntry>?
桥接广播流:attach 态非 null,面板路由注入用 (LogViewerPanel.liveUpdates);detach 后为 null(旧流已关闭)。
no setter

Static Methods

attach({required GlobalKey<NavigatorState> navigatorKey}) → void
挂载悬浮球:创建桥接输出器注册进 logCollector,等根 Overlay 就绪后 把球插入 Overlay。
detach() → void
卸载悬浮球与桥接输出器:球从 Overlay 移除,桥接流关闭,stream 复位 为 null。可再次 attach。
hideBall() → void
隐藏悬浮球(球不在屏则幂等)。面板打开期间用它隐藏球。
showBall() → void
显示悬浮球(attach 态下;球已在屏则幂等)。未 attach / Overlay 未就绪 时为安全 no-op。

Constants

ballKey → const Key
测试可见的悬浮球 Key(cutils_log_viewer_ball)。