toStringDeep method Null safety

String toStringDeep(
  1. {String prefixLineOne = '',
  2. String? prefixOtherLines,
  3. TextTreeConfiguration? parentConfiguration,
  4. DiagnosticLevel minLevel = DiagnosticLevel.debug}
)

Returns a string representation of this node and its descendants.

prefixLineOne will be added to the front of the first line of the output. prefixOtherLines will be added to the front of each other line. If prefixOtherLines is null, the prefixLineOne is used for every line. By default, there is no prefix.

minLevel specifies the minimum DiagnosticLevel for properties included in the output.

The toStringDeep method takes other arguments, but those are intended for internal use when recursing to the descendants, and so can be ignored.

In release mode, far less information is retained and some information may not print at all.

See also:

  • toString, for a brief description of the value but not its children.

Implementation

String toStringDeep({
  String prefixLineOne = '',
  String? prefixOtherLines,
  TextTreeConfiguration? parentConfiguration,
  DiagnosticLevel minLevel = DiagnosticLevel.debug,
}) {
  String result = '';
  assert(() {
    result = TextTreeRenderer(
      minLevel: minLevel,
      wrapWidth: 65,
    ).render(
      this,
      prefixLineOne: prefixLineOne,
      prefixOtherLines: prefixOtherLines,
      parentConfiguration: parentConfiguration,
    );
    return true;
  }());
  return result;
}