DashedDecoration constructor
const
DashedDecoration({})
A custom Decoration that draws a dashed (or dotted) border
around a widget such as a Container, Card, or any Box widget.
Supports:
- Solid dashes and dot-dash patterns
- Configurable spacing, thickness, corner radius
- Optional gradient or solid color
Example:
Container(
decoration: DashedDecoration(
step: 4,
span: 2,
strokeWidth: 1,
radius: Radius.circular(12),
color: Colors.blue,
),
)
Implementation
const DashedDecoration({
this.gradient,
this.color,
this.step = 2.0,
this.span = 2.0,
this.pointCount = 0,
this.pointWidth,
this.radius,
this.strokeWidth = 1.0,
});