PairInterface.clone constructor

  1. @Deprecated('Use `clone()` on an instance instead.')
PairInterface.clone(
  1. PairInterface otherInterface
)

Creates a new instance of a PairInterface with the same ports.

Implementation

@Deprecated('Use `clone()` on an instance instead.')
PairInterface.clone(PairInterface otherInterface)
    : this(
        portsFromConsumer:
            _getMatchPorts(otherInterface, PairDirection.fromConsumer),
        portsFromProvider:
            _getMatchPorts(otherInterface, PairDirection.fromProvider),
        sharedInputPorts:
            _getMatchPorts(otherInterface, PairDirection.sharedInputs),
        commonInOutPorts:
            _getMatchPorts(otherInterface, PairDirection.commonInOuts),
        // Preserve the deprecated callback for legacy constructor callers.
        modify: otherInterface.modify,
      );