TextTreeConfiguration constructor Null safety
- {required String prefixLineOne,
- required String prefixOtherLines,
- required String prefixLastChildLineOne,
- required String prefixOtherLinesRootNode,
- required String linkCharacter,
- required String propertyPrefixIfChildren,
- required String propertyPrefixNoChildren,
- String lineBreak = '\n',
- bool lineBreakProperties = true,
- String afterName = ':',
- String afterDescriptionIfBody = '',
- String afterDescription = '',
- String beforeProperties = '',
- String afterProperties = '',
- String mandatoryAfterProperties = '',
- String propertySeparator = '',
- String bodyIndent = '',
- bool showChildren = true,
- bool addBlankLineIfNoChildren = true,
- bool isNameOnOwnLine = false,
- bool isBlankLineBetweenPropertiesAndChildren = true,
- String beforeName = '',
- String suffixLineOne = '',
Create a configuration object describing how to render a tree as text.
All of the arguments must not be null.
Implementation
TextTreeConfiguration({
required this.prefixLineOne,
required this.prefixOtherLines,
required this.prefixLastChildLineOne,
required this.prefixOtherLinesRootNode,
required this.linkCharacter,
required this.propertyPrefixIfChildren,
required this.propertyPrefixNoChildren,
this.lineBreak = '\n',
this.lineBreakProperties = true,
this.afterName = ':',
this.afterDescriptionIfBody = '',
this.afterDescription = '',
this.beforeProperties = '',
this.afterProperties = '',
this.mandatoryAfterProperties = '',
this.propertySeparator = '',
this.bodyIndent = '',
this.footer = '',
this.showChildren = true,
this.addBlankLineIfNoChildren = true,
this.isNameOnOwnLine = false,
this.isBlankLineBetweenPropertiesAndChildren = true,
this.beforeName = '',
this.suffixLineOne = '',
this.mandatoryFooter = '',
}) : assert(prefixLineOne != null),
assert(prefixOtherLines != null),
assert(prefixLastChildLineOne != null),
assert(prefixOtherLinesRootNode != null),
assert(linkCharacter != null),
assert(propertyPrefixIfChildren != null),
assert(propertyPrefixNoChildren != null),
assert(lineBreak != null),
assert(lineBreakProperties != null),
assert(afterName != null),
assert(afterDescriptionIfBody != null),
assert(afterDescription != null),
assert(beforeProperties != null),
assert(afterProperties != null),
assert(propertySeparator != null),
assert(bodyIndent != null),
assert(footer != null),
assert(showChildren != null),
assert(addBlankLineIfNoChildren != null),
assert(isNameOnOwnLine != null),
assert(isBlankLineBetweenPropertiesAndChildren != null),
childLinkSpace = ' ' * linkCharacter.length;