public BoxDecoration( Color color = null, DecorationImage image = null, Border border = null, BorderRadius borderRadius = null, List <BoxShadow> boxShadow = null, Gradient gradient = null, BlendMode?backgroundBlendMode = null, BoxShape shape = BoxShape.rectangle ) { D.assert( backgroundBlendMode == null || color != null || gradient != null, () => "backgroundBlendMode applies to BoxDecoration\'s background color or " + "gradient, but no color or gradient was provided." ); this.color = color; this.image = image; this.border = border; this.borderRadius = borderRadius; this.boxShadow = boxShadow; this.gradient = gradient; this.backgroundBlendMode = backgroundBlendMode; this.shape = shape; }
public ShapeDecoration( Color color = null, DecorationImage image = null, Gradient gradient = null, List <BoxShadow> shadows = null, ShapeBorder shape = null ) { D.assert(!(color != null && gradient != null)); D.assert(shape != null); this.color = color; this.image = image; this.gradient = gradient; this.shadows = shadows; this.shape = shape; }
public BoxDecoration copyWith( Color color = null, DecorationImage image = null, Border border = null, BorderRadius borderRadius = null, List <BoxShadow> boxShadow = null, Gradient gradient = null, BlendMode?backgroundBlendMode = null, BoxShape?shape = null ) { return(new BoxDecoration( color: color ?? this.color, image: image ?? this.image, border: border ?? this.border, borderRadius: borderRadius ?? this.borderRadius, boxShadow: boxShadow ?? this.boxShadow, gradient: gradient ?? this.gradient, backgroundBlendMode: backgroundBlendMode ?? this.backgroundBlendMode, shape: shape ?? this.shape )); }
internal DecorationImagePainter(DecorationImage details, VoidCallback onChanged) { D.assert(details != null); _details = details; _onChanged = onChanged; }