truncateNodesList method Null safety

List<DiagnosticsNode> truncateNodesList(
  1. List<DiagnosticsNode> nodes,
  2. DiagnosticsNode? owner
)

Truncates the given list of DiagnosticsNode that will be added to the serialization as children or properties of the owner node.

The method must return a subset of the provided nodes and may not replace any nodes. While filterProperties and filterChildren completely hide a node from the serialization, truncating a node will leave a hint in the serialization that there were additional nodes in the result that are not included in the current serialization.

By default, nodes is returned as-is.

Implementation

List<DiagnosticsNode> truncateNodesList(List<DiagnosticsNode> nodes, DiagnosticsNode? owner);