TextTreeConfiguration constructor

TextTreeConfiguration({@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 beforeProperties: '', String afterProperties: '', String propertySeparator: '', String bodyIndent: '', String footer: '', bool showChildren: true, bool addBlankLineIfNoChildren: true, bool isNameOnOwnLine: false, bool isBlankLineBetweenPropertiesAndChildren: true })

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.beforeProperties = '',
  this.afterProperties = '',
  this.propertySeparator = '',
  this.bodyIndent = '',
  this.footer = '',
  this.showChildren = true,
  this.addBlankLineIfNoChildren = true,
  this.isNameOnOwnLine = false,
  this.isBlankLineBetweenPropertiesAndChildren = true,
}) : 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(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;