RectanglePainter constructor

const RectanglePainter({
  1. required double width,
  2. required double height,
  3. required Color color,
  4. double? strokeWidth,
  5. Color? strokeColor,
  6. double? cornerRadius,
})

Creates a rectangle painter.

width is the width of the rectangle in logical pixels. height is the height of the rectangle in logical pixels. color is the fill color of the rectangle. strokeWidth is the width of the rectangle's border. If null, no border is drawn. strokeColor is the color of the rectangle's border. cornerRadius is the radius of the rectangle's corners. If null, sharp corners are used.

Implementation

const RectanglePainter({
  required this.width,
  required this.height,
  required this.color,
  this.strokeWidth,
  this.strokeColor,
  this.cornerRadius,
});