decoration method
Container
decoration({
- Key? key,
- Color? color,
- DecorationImage? image,
- BoxBorder? border,
- BorderRadiusGeometry? borderRadius,
- List<
BoxShadow> ? boxShadow, - Gradient? gradient,
- BlendMode? backgroundBlendMode,
- BoxShape shape = .rectangle,
Returns a decorated widget with the given decoration.
Implementation
Container decoration({
Key? key,
Color? color,
DecorationImage? image,
BoxBorder? border,
BorderRadiusGeometry? borderRadius,
List<BoxShadow>? boxShadow,
Gradient? gradient,
BlendMode? backgroundBlendMode,
BoxShape shape = .rectangle,
}) {
return Container(
key: key,
decoration: BoxDecoration(
backgroundBlendMode: backgroundBlendMode,
color: color,
borderRadius: borderRadius,
border: border,
boxShadow: boxShadow,
gradient: gradient,
image: image,
shape: shape,
),
child: this,
);
}