Fix the spelling of manditory (#50746)

This commit is contained in:
Greg Spencer 2020-02-14 08:43:02 -08:00 committed by GitHub
parent d1185337cc
commit 18984101d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,7 +215,7 @@ class TextTreeConfiguration {
this.isBlankLineBetweenPropertiesAndChildren = true, this.isBlankLineBetweenPropertiesAndChildren = true,
this.beforeName = '', this.beforeName = '',
this.suffixLineOne = '', this.suffixLineOne = '',
this.manditoryFooter = '', this.mandatoryFooter = '',
}) : assert(prefixLineOne != null), }) : assert(prefixLineOne != null),
assert(prefixOtherLines != null), assert(prefixOtherLines != null),
assert(prefixLastChildLineOne != null), assert(prefixLastChildLineOne != null),
@ -363,7 +363,7 @@ class TextTreeConfiguration {
final String footer; final String footer;
/// Footer to add even for root nodes. /// Footer to add even for root nodes.
final String manditoryFooter; final String mandatoryFooter;
/// Add a blank line between properties and children if both are present. /// Add a blank line between properties and children if both are present.
final bool isBlankLineBetweenPropertiesAndChildren; final bool isBlankLineBetweenPropertiesAndChildren;
@ -600,7 +600,7 @@ final TextTreeConfiguration errorTextConfiguration = TextTreeConfiguration(
prefixOtherLinesRootNode: '', prefixOtherLinesRootNode: '',
beforeName: '══╡ ', beforeName: '══╡ ',
suffixLineOne: ' ╞══', suffixLineOne: ' ╞══',
manditoryFooter: '═════', mandatoryFooter: '═════',
// No need to add a blank line as the footer makes the boundary of this // No need to add a blank line as the footer makes the boundary of this
// subtree unambiguous. // subtree unambiguous.
addBlankLineIfNoChildren: false, addBlankLineIfNoChildren: false,
@ -1341,9 +1341,9 @@ class TextTreeRenderer {
if (childConfig.footer.isNotEmpty) { if (childConfig.footer.isNotEmpty) {
builder.prefixOtherLines = prefixChildrenRaw; builder.prefixOtherLines = prefixChildrenRaw;
builder.write('${childConfig.childLinkSpace}${childConfig.footer}'); builder.write('${childConfig.childLinkSpace}${childConfig.footer}');
if (childConfig.manditoryFooter.isNotEmpty) { if (childConfig.mandatoryFooter.isNotEmpty) {
builder.writeStretched( builder.writeStretched(
childConfig.manditoryFooter, childConfig.mandatoryFooter,
math.max(builder.wrapWidth, _wrapWidthProperties + childPrefixOtherLines.length), math.max(builder.wrapWidth, _wrapWidthProperties + childPrefixOtherLines.length),
); );
} }
@ -1362,9 +1362,9 @@ class TextTreeRenderer {
if (childConfig.footer.isNotEmpty) { if (childConfig.footer.isNotEmpty) {
builder.prefixOtherLines = prefixChildrenRaw; builder.prefixOtherLines = prefixChildrenRaw;
builder.write('${childConfig.linkCharacter}${childConfig.footer}'); builder.write('${childConfig.linkCharacter}${childConfig.footer}');
if (childConfig.manditoryFooter.isNotEmpty) { if (childConfig.mandatoryFooter.isNotEmpty) {
builder.writeStretched( builder.writeStretched(
childConfig.manditoryFooter, childConfig.mandatoryFooter,
math.max(builder.wrapWidth, _wrapWidthProperties + childPrefixOtherLines.length), math.max(builder.wrapWidth, _wrapWidthProperties + childPrefixOtherLines.length),
); );
} }
@ -1373,8 +1373,8 @@ class TextTreeRenderer {
} }
} }
} }
if (parentConfiguration == null && config.manditoryFooter.isNotEmpty) { if (parentConfiguration == null && config.mandatoryFooter.isNotEmpty) {
builder.writeStretched(config.manditoryFooter, builder.wrapWidth); builder.writeStretched(config.mandatoryFooter, builder.wrapWidth);
builder.write(config.lineBreak); builder.write(config.lineBreak);
} }
return builder.build(); return builder.build();