title: How to draw a hexagon shape in flutter?
body: <p>I wanted to draw a hexagon shape but I couldn't do what I wanted.
  this is my result:</p>
  <pre><code>Path createHexagonPath() {
      const int SIDES_OF_HEXAGON = 6;
      const double radius = 50;
      const Offset center = Offset(50, 50);
      final path = Path();
      var angle = (pi * 2) / SIDES_OF_HEXAGON;
      Offset firstPoint = Offset(radius * cos(0.0), radius * sin(0.0));
      path.moveTo(firstPoint.dx + center.dx, firstPoint.dy + center.dy);
      for (int i = 1; i &lt;= SIDES_OF_HEXAGON; i++) {
        double x = radius * cos(angle * i) + center.dx;
        double y = radius * sin(angle * i) + center.dy;
        path.lineTo(x, y);
      }
      path.close();
      return path;
    }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/hbTZR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hbTZR.png" alt="enter image description here" /></a></p>
  <p><strong>I want that to be the case:</strong></p>
  <p><a href="https://i.stack.imgur.com/JtrzZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JtrzZ.png" alt="enter image description here" /></a></p>