LogViewerEntryTile class
- @Author: chuxiong
- @Created at: 2026/10/27
- @Email:
- @Company: 嘉联支付
- description 日志查看器条目卡片:级别配色结构化卡片,点击展开完整详情 日志查看器条目卡片:把一条 LogEntry 渲染为 talker 风格的结构化卡片。
收起态(行 1):HH:mm:ss.SSS 时间 + 级别徽章(Key
log_viewer_level_badge,底色取 LogViewerTheme.colorOf)+ tag 芯片 +
单行消息(超长 ellipsis,按级别色着色);LogLevel.fatal 卡片左侧
色条加粗(6px,其余 3px)。
点击卡片(InkWell)展开 / 收起详情区:完整 message / error / 堆栈 (等宽字体区)/ extra 逐键值行。
网络条目(LogEntry.extra 含 method 键即判为网络卡)复用同一骨架:
method 徽章替换级别徽章位置、消息位显示 url、行尾附状态码
(LogViewerTheme.statusColorOf 着色,null 显示 FAILED)与耗时。
颜色一律取 LogViewerTheme。本类为 StatelessWidget:展开 / 收起的 交互状态由内部私有的 StatefulWidget 持有,条目数据本身不可变。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- LogViewerEntryTile
- Available extensions
Constructors
- LogViewerEntryTile({Key? key, required LogEntry entry})
-
构造条目卡片。
const
Properties
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
gesture(
{GestureTapCallback? onTap, GestureTapCallback? onDoubleTap, GestureLongPressCallback? onLongPress}) → Widget -
Available on Widget, provided by the WidgetExt extension
用 GestureDetector(无水波纹)包裹本组件,支持单击 / 双击 / 长按。 -
gestureWithInkWellCircle(
{GestureTapCallback? onTap, GestureTapCallback? onDoubleTap, GestureLongPressCallback? onLongPress}) → Material -
Available on Widget, provided by the WidgetExt extension
用带水波纹的 Material + InkWell 包裹本组件,常用于圆形可点击区域。 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
padding(
EdgeInsetsGeometry padding) → Widget -
Available on Widget, provided by the WidgetExt extension
用 Padding 包裹本组件,等价于Padding(padding: padding, child: this)。 -
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited