paint method
- Canvas canvas,
- Rect rect, {
- double? gapStart,
- double gapExtent = 0.0,
- double gapPercentage = 0.0,
- TextDirection? textDirection,
override
Draw a horizontal line at the bottom of rect
.
The borderSide defines the line's color and weight. The textDirection
gap
and textDirection
parameters are ignored.
Implementation
@override
void paint(
Canvas canvas,
Rect rect, {
double? gapStart,
double gapExtent = 0.0,
double gapPercentage = 0.0,
TextDirection? textDirection,
}) {
final Paint paint = borderSide.toPaint();
final RRect outer = borderRadius!.toRRect(rect);
final RRect center = outer.deflate(borderSide.width / 2.0);
canvas.drawRRect(center, paint);
}