withShadow method
Container
withShadow({
- Color bgColor = whiteColor,
- Color shadowColor = Colors.black12,
- dynamic blurRadius = 10.0,
- dynamic spreadRadius = 0.0,
- Offset offset = const Offset(0.0, 0.0),
- LinearGradient? gradient,
- BoxBorder? border,
- DecorationImage? decorationImage,
- BoxShape boxShape = BoxShape.rectangle,
Implementation
@deprecated
Container withShadow({
Color bgColor = whiteColor,
Color shadowColor = Colors.black12,
blurRadius = 10.0,
spreadRadius = 0.0,
Offset offset = const Offset(0.0, 0.0),
LinearGradient? gradient,
BoxBorder? border,
DecorationImage? decorationImage,
BoxShape boxShape = BoxShape.rectangle,
}) {
return Container(
decoration: boxDecorationWithShadow(
boxShadow: [
BoxShadow(
color: shadowColor,
blurRadius: blurRadius,
spreadRadius: spreadRadius,
offset: offset,
),
],
backgroundColor: bgColor,
gradient: gradient,
border: border,
decorationImage: decorationImage,
boxShape: boxShape,
),
child: this,
);
}