boxShadow method
Implementation
Widget boxShadow({
Key? key,
Color color = const Color(0xFF000000),
Offset offset = Offset.zero,
double blurRadius = 0.0,
double spreadRadius = 0.0,
bool animate = false,
}) {
BoxDecoration decoration = BoxDecoration(
boxShadow: [
BoxShadow(
color: color,
blurRadius: blurRadius,
spreadRadius: spreadRadius,
offset: offset,
),
],
);
return animate
? _StyledAnimatedBuilder(
key: key,
builder: (animation) {
return _AnimatedDecorationBox(
child: this,
decoration: decoration,
duration: animation.duration,
curve: animation.curve,
);
},
)
: DecoratedBox(
key: key,
child: this,
decoration: decoration,
);
}