getOuterBorderPaint method
Gets a Paint for the outer border drawing.
Implementation
Paint getOuterBorderPaint([Rect? bounds]) {
assert(hasOuterBorder);
assert(outerBorderGradient == null && outerBorderColor != null ||
outerBorderGradient != null && outerBorderColor == null);
final paint = Paint()
..isAntiAlias = true
..filterQuality = FilterQuality.medium
..style = PaintingStyle.fill
..strokeCap = StrokeCap.square
..strokeWidth = outerBorderStroke;
if (outerBorderColor != null) {
paint.color = outerBorderColor!;
}
if (outerBorderGradient != null) {
assert(
bounds != null,
'bounds must not be null if outerBorderGradient not null',
);
paint.shader = outerBorderGradient!.createShader(bounds!);
}
return paint;
}