RoundRectShape constructor

RoundRectShape({
  1. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(12)),
  2. double borderWidth = 0.0,
  3. Color borderColor = const Color(0xffffffff),
})

Creates a new RoundRectShape with the specified styling options.

borderRadius - Defines the corner radii for each corner. Defaults to 12-pixel circular radius for all corners. borderWidth - The width of the border stroke. Defaults to 0.0 (no border). borderColor - The color of the border. Defaults to white. Only visible when borderWidth > 0.

Implementation

RoundRectShape({
  this.borderRadius = const BorderRadius.all(Radius.circular(12)),
  this.borderWidth = 0.0,
  this.borderColor = const Color(0xffffffff),
}) {
  this.borderPaint.isAntiAlias = true;
  this.borderPaint.style = PaintingStyle.stroke;
}