addPairInterfaceFrom<InterfaceType extends PairInterface> method

InterfaceType addPairInterfaceFrom<InterfaceType extends PairInterface>(
  1. InterfaceType target,
  2. PairInterface source,
  3. PairRole role, {
  4. String uniquify(
    1. String original
    )?,
})

Registers a deliberately retyped pair target against source for role and returns target.

Prefer addStructuredPairInterface when target would be a plain clone of source. This form does not clone target and retains the role-specific, recursive registration behavior of PairInterface.pairConnectIO.

Implementation

InterfaceType addPairInterfaceFrom<InterfaceType extends PairInterface>(
  InterfaceType target,
  PairInterface source,
  PairRole role, {
  String Function(String original)? uniquify,
}) =>
    target..pairConnectIO(this, source, role, uniquify: uniquify);