portsFor method
Implementation
List<PortDefinition> portsFor(ShapeElement shape) => switch (kind) {
ShapeConnectionKind.fixedPorts => fixedPorts,
ShapeConnectionKind.instancePorts =>
shape.ports.isEmpty
? _defaultPorts()
: [for (final port in shape.ports) PortDefinition.fromInstance(port)],
ShapeConnectionKind.none || ShapeConnectionKind.outline => const [],
};