getEdgeMargins function

List<AnchorMargin> getEdgeMargins(
  1. MatrixNode node,
  2. MatrixNode income
)

Implementation

List<AnchorMargin> getEdgeMargins(MatrixNode node, MatrixNode income) {
  if (node.isAnchor && income.isAnchor) {
    return [node.anchorMargin!, income.anchorMargin!];
  } else if (node.isAnchor) {
    return [node.anchorMargin!, node.anchorMargin!];
  } else if (income.isAnchor) {
    return [income.anchorMargin!, income.anchorMargin!];
  } else {
    return [AnchorMargin.none, AnchorMargin.none];
  }
}