DiagnosticsNode constructor Null safety
- {required String? name,
- DiagnosticsTreeStyle? style,
- bool showName = true,
- bool showSeparator = true,
- String? linePrefix}
Initializes the object.
The style, showName, and showSeparator arguments must not be null.
Implementation
DiagnosticsNode({
required this.name,
this.style,
this.showName = true,
this.showSeparator = true,
this.linePrefix,
}) : assert(showName != null),
assert(showSeparator != null),
// A name ending with ':' indicates that the user forgot that the ':' will
// be automatically added for them when generating descriptions of the
// property.
assert(
name == null || !name.endsWith(':'),
'Names of diagnostic nodes must not end with colons.\n'
'name:\n'
' "$name"',
);