toDiagnosticsNode method Null safety

  1. @override
DiagnosticsNode toDiagnosticsNode(
  1. {String? name,
  2. DiagnosticsTreeStyle? style = DiagnosticsTreeStyle.sparse,
  3. DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.traversalOrder}
)
override

Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.

Leave name as null if there is not a meaningful description of the relationship between the this node and its parent.

Typically the style argument is only specified to indicate an atypical relationship between the parent and the node. For example, pass DiagnosticsTreeStyle.offstage to indicate that a node is offstage.

Implementation

@override
DiagnosticsNode toDiagnosticsNode({
  String? name,
  DiagnosticsTreeStyle? style = DiagnosticsTreeStyle.sparse,
  DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.traversalOrder,
}) {
  return _SemanticsDiagnosticableNode(
    name: name,
    value: this,
    style: style,
    childOrder: childOrder,
  );
}