DiagnosticsNode class abstract

Defines diagnostics data for a value.

For debug and profile modes, DiagnosticsNode provides a high quality multiline string dump via toStringDeep. The core members are the name, toDescription, getProperties, value, and getChildren. All other members exist typically to provide hints for how toStringDeep and debugging tools should format output.

In release mode, far less information is retained and some information may not print at all.

Implementers

Constructors

DiagnosticsNode({required String? name, DiagnosticsTreeStyle? style, bool showName = true, bool showSeparator = true, String? linePrefix})
Initializes the object.
DiagnosticsNode.message(String message, {DiagnosticsTreeStyle style = DiagnosticsTreeStyle.singleLine, DiagnosticLevel level = DiagnosticLevel.info, bool allowWrap = true})
Diagnostics containing just a string message and not a concrete name or value.
factory

Properties

allowNameWrap bool
Whether to wrap the name onto multiple lines or not.
no setter
allowTruncate bool
Whether to allow truncation when displaying the node and its children.
no setter
allowWrap bool
Whether to wrap text on onto multiple lines or not.
no setter
emptyBodyDescription String?
Description to show if the node has no displayed properties or children.
no setter
hashCode int
The hash code for this object.
no setterinherited
level DiagnosticLevel
Priority level of the diagnostic used to control which diagnostics should be shown and filtered.
no setter
linePrefix String?
Prefix to include at the start of each line.
final
name String?
Label describing the DiagnosticsNode, typically shown before a separator (see showSeparator).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showName bool
Whether the name of the property should be shown when showing the default view of the tree.
final
showSeparator bool
Whether to show a separator between name and description.
final
style DiagnosticsTreeStyle?
Hint for how the node should be displayed.
final
textTreeConfiguration TextTreeConfiguration?
Returns a configuration specifying how this object should be rendered as text art.
no setter
value Object?
The actual object this is diagnostics data for.
no setter

Methods

getChildren() List<DiagnosticsNode>
Children of this DiagnosticsNode.
getProperties() List<DiagnosticsNode>
Properties of this DiagnosticsNode.
isFiltered(DiagnosticLevel minLevel) bool
Whether the diagnostic should be filtered due to its level being lower than minLevel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDescription({TextTreeConfiguration? parentConfiguration}) String
Returns a description with a short summary of the node itself not including children or properties.
toJsonMap(DiagnosticsSerializationDelegate delegate) Map<String, Object?>
Serialize the node to a JSON map according to the configuration provided in the DiagnosticsSerializationDelegate.
toString({TextTreeConfiguration? parentConfiguration, DiagnosticLevel minLevel = DiagnosticLevel.info}) String
Returns a string representation of this diagnostic that is compatible with the style of the parent if the node is not the root.
override
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, TextTreeConfiguration? parentConfiguration, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
toTimelineArguments() Map<String, String>?
Converts the properties (getProperties) of this node to a form useful for Timeline event arguments (as in Timeline.startSync).

Operators

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

Static Methods

toJsonList(List<DiagnosticsNode>? nodes, DiagnosticsNode? parent, DiagnosticsSerializationDelegate delegate) List<Map<String, Object?>>
Serializes a List of DiagnosticsNodes to a JSON list according to the configuration provided by the DiagnosticsSerializationDelegate.