BackgroundStyle constructor
BackgroundStyle({})
Implementation
BackgroundStyle({
Color? color,
Paint? paint,
Color? borderColor,
double? borderRadius,
double? borderWidth,
}) : assert(
paint == null || color == null,
'Parameters `paint` and `color` are exclusive',
),
borderWidths = EdgeInsets.all(borderWidth ?? 0),
borderRadius = borderRadius ?? 0,
backgroundPaint =
paint ?? (color != null ? (Paint()..color = color) : null),
borderPaint = borderColor != null
? (Paint()
..color = borderColor
..style = PaintingStyle.stroke
..strokeWidth = borderWidth ?? 0)
: null;