setText method
Implementation
void setText(String data) {
final existingPropertyIndex = properties
.indexWhere((element) => element.property == NodeProperties.textData);
if (existingPropertyIndex >= 0) {
properties[existingPropertyIndex] = TextProperty(textData: data);
} else {
properties.add(TextProperty(textData: data));
}
}