objectToDiagnosticsNode static method

  1. @visibleForTesting
DiagnosticsNode? objectToDiagnosticsNode(
  1. Object? object
)

If possible, returns DiagnosticsNode for the object.

Implementation

@visibleForTesting
static DiagnosticsNode? objectToDiagnosticsNode(Object? object) {
  if (object is Diagnosticable) {
    return object.toDiagnosticsNode();
  }
  return null;
}