Diagnosticable class
A base class for providing string and DiagnosticsNode debug representations describing the properties of an object.
The string debug representation is generated from the intermediate DiagnosticsNode representation. The DiagnosticsNode representation is also used by debugging tools displaying interactive trees of objects and properties.
See also:
- DiagnosticableTree, which extends this class to also describe the children of a tree structured object.
- Diagnosticable.debugFillProperties, which lists best practices
for specifying the properties of a
DiagnosticNode
. The most common use case is to override debugFillProperties defining custom properties for a subclass ofTreeDiagnosticsMixin
using the existing DiagnosticsProperty subclasses. - DiagnosticableTree.debugDescribeChildren, which lists best practices
for describing the children of a
DiagnosticNode
. Typically the base class already describes the children of a node properly or a node has no children. - DiagnosticsProperty, which should be used to create leaf diagnostic
nodes without properties or children. There are many
DiagnosticProperty
subclasses to handle common use cases.
- Implementers
Constructors
- Diagnosticable()
-
Abstract const constructor. This constructor enables subclasses to provide
const constructors so that they can be used in const expressions.
const
Properties
- 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
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node. [...]
@mustCallSuper, @protected
-
toDiagnosticsNode(
{String name, DiagnosticsTreeStyle style }) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by
toStringDeep
. [...] -
toString(
{DiagnosticLevel minLevel: DiagnosticLevel.debug }) → String -
Returns a string representation of this object.
override
-
toStringShort(
) → String - A brief description of this object, usually just the runtimeType and the hashCode. [...]
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited