pathOf static method

DiagramVectorPath? pathOf(
  1. ShapeElement source,
  2. ShapeDefinition definition
)

The path source edits point by point, or null when its type has none.

Implementation

static DiagramVectorPath? pathOf(
  ShapeElement source,
  ShapeDefinition definition,
) => switch (definition.pathValue) {
  final key? => DiagramVectorPath.fromValue(source.values[key]),
  null => null,
};