removeComponent method

void removeComponent(
  1. Component component
)

Remove a component from the artboard and its various tracked lists of components.

Implementation

void removeComponent(Component component) {
  _components.remove(component);
  switch (component.coreType) {
    case NestedArtboardBase.typeKey:
      removeNestedArtboard(component as NestedArtboard);
      break;
    case NestedBoolBase.typeKey:
    case NestedNumberBase.typeKey:
    case NestedTriggerBase.typeKey:
      break;
    case JoystickBase.typeKey:
      _joysticks.remove(component as Joystick);
      break;
  }
}