# setParentFactory method

1. @override

void setParentFactory(

1. PodFactory? parent

)
override

Sets the parent factory for this hierarchical factory.

## Usage Example:

    final childFactory = JetleafPodFactory();
    childFactory.setParentFactory(parentFactory);

@param parentFactory The parent factory to set, or null to remove parent

## Implementation

    @override
    void setParentFactory(PodFactory? parent) {
      if (this == parent) {
    			throw IllegalStateException("Cannot set parent pod provider to self");
    		}

      if (_parentPodFactory != null && _parentPodFactory != parent) {
        throw IllegalStateException('Parent provider already set and not equal to new parent');
      }

      _parentPodFactory = parent;
    }