DiagnosticsNode.message constructor

DiagnosticsNode.message(String message, { DiagnosticsTreeStyle style: DiagnosticsTreeStyle.singleLine, DiagnosticLevel level: DiagnosticLevel.info, bool allowWrap: true })

Diagnostics containing just a string message and not a concrete name or value.

The style and level arguments must not be null.

See also:

  • MessageProperty, which is better suited to messages that are to be formatted like a property with a separate name and message.

Implementation

factory DiagnosticsNode.message(
  String message, {
  DiagnosticsTreeStyle style = DiagnosticsTreeStyle.singleLine,
  DiagnosticLevel level = DiagnosticLevel.info,
  bool allowWrap = true,
}) {
  assert(style != null);
  assert(level != null);
  return DiagnosticsProperty<void>(
    '',
    null,
    description: message,
    style: style,
    showName: false,
    allowWrap: allowWrap,
    level: level,
  );
}