Unverified Commit 18984101 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Fix the spelling of manditory (#50746)

parent d1185337
......@@ -215,7 +215,7 @@ class TextTreeConfiguration {
this.isBlankLineBetweenPropertiesAndChildren = true,
this.beforeName = '',
this.suffixLineOne = '',
this.manditoryFooter = '',
this.mandatoryFooter = '',
}) : assert(prefixLineOne != null),
assert(prefixOtherLines != null),
assert(prefixLastChildLineOne != null),
......@@ -363,7 +363,7 @@ class TextTreeConfiguration {
final String footer;
/// 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.
final bool isBlankLineBetweenPropertiesAndChildren;
......@@ -600,7 +600,7 @@ final TextTreeConfiguration errorTextConfiguration = TextTreeConfiguration(
prefixOtherLinesRootNode: '',
beforeName: '══╡ ',
suffixLineOne: ' ╞══',
manditoryFooter: '═════',
mandatoryFooter: '═════',
// No need to add a blank line as the footer makes the boundary of this
// subtree unambiguous.
addBlankLineIfNoChildren: false,
......@@ -1341,9 +1341,9 @@ class TextTreeRenderer {
if (childConfig.footer.isNotEmpty) {
builder.prefixOtherLines = prefixChildrenRaw;
builder.write('${childConfig.childLinkSpace}${childConfig.footer}');
if (childConfig.manditoryFooter.isNotEmpty) {
if (childConfig.mandatoryFooter.isNotEmpty) {
builder.writeStretched(
childConfig.manditoryFooter,
childConfig.mandatoryFooter,
math.max(builder.wrapWidth, _wrapWidthProperties + childPrefixOtherLines.length),
);
}
......@@ -1362,9 +1362,9 @@ class TextTreeRenderer {
if (childConfig.footer.isNotEmpty) {
builder.prefixOtherLines = prefixChildrenRaw;
builder.write('${childConfig.linkCharacter}${childConfig.footer}');
if (childConfig.manditoryFooter.isNotEmpty) {
if (childConfig.mandatoryFooter.isNotEmpty) {
builder.writeStretched(
childConfig.manditoryFooter,
childConfig.mandatoryFooter,
math.max(builder.wrapWidth, _wrapWidthProperties + childPrefixOtherLines.length),
);
}
......@@ -1373,8 +1373,8 @@ class TextTreeRenderer {
}
}
}
if (parentConfiguration == null && config.manditoryFooter.isNotEmpty) {
builder.writeStretched(config.manditoryFooter, builder.wrapWidth);
if (parentConfiguration == null && config.mandatoryFooter.isNotEmpty) {
builder.writeStretched(config.mandatoryFooter, builder.wrapWidth);
builder.write(config.lineBreak);
}
return builder.build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment