setText method

void setText(
  1. String data
)

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));
  }
}