FlutterPolygonBorder constructor

const FlutterPolygonBorder({
  1. required int sides,
  2. double rotate = 0.0,
  3. double borderRadius = 0.0,
  4. BorderSide side = BorderSide.none,
})

Create a PolygonBorder number of sides equal to sides, rotated by rotate degrees.

Provide a borderRadius to set the radius of the corners.

Use side to define the outline's color and weight. If side is BorderSide.none, which is the default, an outline is not drawn. Otherwise the outline is centered over the shape's boundary.

sides should be at least 3.

All variables must not be null.

Implementation

const FlutterPolygonBorder({
  required this.sides,
  this.rotate = 0.0,
  this.borderRadius = 0.0,
  BorderSide side = BorderSide.none,
})  : assert(sides >= 2),
      super(side: side);