# RootPodDefinition.from constructor

RootPodDefinition.from(

1. PodDefinition other

)

Creates a new RootPodDefinition by copying the state of another AbstractPodDefinition.

This is useful for scenarios where you want to transform or re-wrap an existing pod definition while keeping all its configuration intact.

### Example

    final other = RootPodDefinition(name: "other", type: Class<OtherService>());
    other.setIsPodProvider(true);

    final copy = RootPodDefinition.from(other);
    print(copy.getIsPodProvider()); // true

## Implementation

    factory RootPodDefinition.from(PodDefinition other) {
      final result = RootPodDefinition(type: other.type)
        ..name = other.name
        ..description = other.description
        ..scope = other.scope
        ..design = other.design
        ..lifecycle = other.lifecycle
        ..dependsOn = other.dependsOn
        ..propertyValues = other.propertyValues
        ..factoryMethod = other.factoryMethod
        ..autowireCandidate = other.autowireCandidate
        ..executableArgumentValues = other.executableArgumentValues
        ..isPodProvider = other.isPodProvider
        ..dependencyCheck = other.dependencyCheck;

      if (other is AbstractPodDefinition) {
        result._isStale = other._isStale;
        result._podExpression = other._podExpression;
      }

      return result;
    }