setImage method

void setImage(
  1. String data
)

Implementation

void setImage(String data) {
  final existingPropertyIndex = properties
      .indexWhere((element) => element.property == NodeProperties.imageData);
  if (existingPropertyIndex >= 0) {
    properties[existingPropertyIndex] = ImageProperty(imageData: data);
  } else {
    properties.add(ImageProperty(imageData: data));
  }
}