textTreeConfiguration property Null safety

TextTreeConfiguration? textTreeConfiguration
protected">@protected

Returns a configuration specifying how this object should be rendered as text art.

Implementation

@protected
TextTreeConfiguration? get textTreeConfiguration {
  assert(style != null);
  switch (style!) {
    case DiagnosticsTreeStyle.none:
      return null;
    case DiagnosticsTreeStyle.dense:
      return denseTextConfiguration;
    case DiagnosticsTreeStyle.sparse:
      return sparseTextConfiguration;
    case DiagnosticsTreeStyle.offstage:
      return dashedTextConfiguration;
    case DiagnosticsTreeStyle.whitespace:
      return whitespaceTextConfiguration;
    case DiagnosticsTreeStyle.transition:
      return transitionTextConfiguration;
    case DiagnosticsTreeStyle.singleLine:
      return singleLineTextConfiguration;
    case DiagnosticsTreeStyle.errorProperty:
      return errorPropertyTextConfiguration;
    case DiagnosticsTreeStyle.shallow:
      return shallowTextConfiguration;
    case DiagnosticsTreeStyle.error:
      return errorTextConfiguration;
    case DiagnosticsTreeStyle.truncateChildren:
      // Truncate children doesn't really need its own text style as the
      // rendering is quite custom.
      return whitespaceTextConfiguration;
    case DiagnosticsTreeStyle.flat:
      return flatTextConfiguration;
  }
}