NUIBoxDecoration constructor
NUIBoxDecoration({
- BoxShape shape = BoxShape.rectangle,
- Border? border,
- double borderRadiusCircular = 0,
- Offset? shadowOffset,
- BorderRadius? borderRadius,
- double shadowRadius = 0,
- Color? color,
- double spreadRadius = 0,
- Color shadowColor = NUIColors.NUIShadowBlack,
- NUILinearGradient? gradient,
Implementation
NUIBoxDecoration({
final BoxShape shape = BoxShape.rectangle,
final Border? border,
final double borderRadiusCircular = 0,
final Offset? shadowOffset,
final BorderRadius? borderRadius,
this.shadowRadius = 0,
this.color,
this.spreadRadius = 0,
this.shadowColor = NUIColors.NUIShadowBlack,
this.gradient
})
: super(shape: shape, border: border, borderRadius: borderRadius ?? (shape == BoxShape.rectangle && borderRadiusCircular > 0 ? BorderRadius.circular(borderRadiusCircular) : null), color: color, boxShadow:shadowRadius > 0 ? [BoxShadow(spreadRadius: spreadRadius ?? 0, blurRadius: shadowRadius, color: shadowColor, offset: shadowOffset ?? Offset(0, 0))] : null, gradient: gradient);