isValid method

bool isValid()

Validates the component.

Returns true if the component is valid, false otherwise.

Implementation

bool isValid() {
  // Validate specific component types
  if (type == ComponentType.button && index == null) {
    return false;
  }

  // Validate all parameters
  for (final parameter in parameters) {
    if (!parameter.isValid()) {
      return false;
    }
  }

  return true;
}