NUIBoxDecoration constructor

NUIBoxDecoration({
  1. BoxShape shape = BoxShape.rectangle,
  2. Border? border,
  3. double borderRadiusCircular = 0,
  4. Offset? shadowOffset,
  5. BorderRadius? borderRadius,
  6. double shadowRadius = 0,
  7. Color? color,
  8. double spreadRadius = 0,
  9. Color shadowColor = NUIColors.NUIShadowBlack,
  10. 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);