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