setIcon method
Implementation
void setIcon(IconData data) {
final existingPropertyIndex = properties
.indexWhere((element) => element.property == NodeProperties.iconData);
if (existingPropertyIndex >= 0) {
properties[existingPropertyIndex] = IconProperty(iconData: data);
} else {
properties.add(IconProperty(iconData: data));
}
}