valueToString method Null safety
- {TextTreeConfiguration? parentConfiguration}
override
Returns a string representation of the property value.
Subclasses should override this method instead of toDescription to customize how property values are converted to strings.
Overriding this method ensures that behavior controlling how property values are decorated to generate a nice toDescription are consistent across all implementations. Debugging tools may also choose to use valueToString directly instead of toDescription.
parentConfiguration
specifies how the parent is rendered as text art.
For example, if the parent places all properties on one line, the value
of the property should be displayed without line breaks if possible.
Implementation
@override
String valueToString({ TextTreeConfiguration? parentConfiguration }) {
if (value ?? false) {
if (ifTrue != null) {
return ifTrue!;
}
} else if (value == false) {
if (ifFalse != null) {
return ifFalse!;
}
}
return super.valueToString(parentConfiguration: parentConfiguration);
}