buildPath method

  1. @override
Path buildPath(
  1. Size size
)
override

Builds the path that defines this shape's outline.

The path should be constructed within the bounds of the given size. The origin (0,0) represents the top-left corner.

Parameters:

  • size - The size of the node

Returns a Path that defines the shape's outline.

Implementation

@override
Path buildPath(Size size) {
  if (orientation == HexagonOrientation.horizontal) {
    return _buildHorizontalHexagon(size);
  } else {
    return _buildVerticalHexagon(size);
  }
}