DiamondShape class
A diamond (rhombus) node shape.
This shape renders nodes as diamonds, commonly used for:
- Decision nodes in flowcharts (if/else branches)
- Gateway nodes in BPMN diagrams
- Conditional logic nodes
The diamond has four points at the cardinal directions (top, right, bottom, left). Ports are positioned at these four points.
Example:
DiamondShape(
fillColor: Colors.orange,
strokeColor: Colors.deepOrange,
strokeWidth: 2.0,
)
Constructors
- DiamondShape({Color? fillColor, Color? strokeColor, double? strokeWidth})
-
Creates a diamond shape.
const
Properties
- fillColor → Color?
-
The fill color for the shape background.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strokeColor → Color?
-
The stroke (border) color for the shape outline.
finalinherited
- strokeWidth → double?
-
The stroke (border) width for the shape outline.
finalinherited
Methods
-
buildPath(
Size size) → Path -
Builds the path that defines this shape's outline.
override
-
containsPoint(
Offset point, Size size) → bool -
Checks if a point is inside this shape.
override
-
getBounds(
Size size) → Rect -
Gets the bounding rectangle for this shape.
override
-
getPortAnchors(
Size size) → List< PortAnchor> -
Gets the port anchor points for this shape.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited