DiagnosticsNode class

Defines diagnostics data for a value.

DiagnosticsNode provides a high quality multi-line 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.

Implemented by

Constructors

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

Properties

emptyBodyDescription String
Description to show if the node has no displayed properties or children.
read-only
level DiagnosticLevel
Priority level of the diagnostic used to control which diagnostics should be shown and filtered. [...]
read-only
name String
Label describing the DiagnosticsNode, typically shown before a separator (see showSeparator). [...]
final
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.
@protected, read-only
value Object
The actual object this is diagnostics data for.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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. [...]
toDescription({TextTreeConfiguration parentConfiguration }) String
Returns a description with a short summary of the node itself not including children or properties. [...]
toJsonMap() Map<String, Object>
Serialize the node excluding its descendants to a JSON map. [...]
@mustCallSuper
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. [...]
toStringDeep({String prefixLineOne: '', String prefixOtherLines, TextTreeConfiguration parentConfiguration, DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this node and its descendants. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
@pragma('vm:entry-point'), inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited