setIcon method

void setIcon(
  1. IconData data
)

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