setDropdownItems method

void setDropdownItems(
  1. List<DropdownMenuItem>? dropdownItems
)

Implementation

void setDropdownItems(List<DropdownMenuItem<dynamic>>? dropdownItems) {
  final existingPropertyIndex = properties
      .indexWhere((element) => element.property == NodeProperties.iconData);
  if (existingPropertyIndex >= 0) {
    properties[existingPropertyIndex] =
        DropdownItemsProperty(dropdownItems: dropdownItems);
  } else {
    properties.add(DropdownItemsProperty(dropdownItems: dropdownItems));
  }
}