PortDefinition.onSide constructor
PortDefinition.onSide({})
Creates a port on one side of the shape. position is normalized along
that side from left-to-right or top-to-bottom.
Implementation
factory PortDefinition.onSide({
required String id,
required PortSide side,
double position = 0.5,
String? targetLayerId,
PortStyle style = const PortStyle(),
}) => PortDefinition(
id: id,
placement: PortPlacement.sideFraction(
side: side,
offset: position,
targetLayerId: targetLayerId,
),
style: style,
);