shadowOnly method
- @Deprecated('Use shadow(.color(c).offset(x: x, y: y).blurRadius(b).spreadRadius(s)) for known values, or shadow(BoxShadowMix(...)) when forwarding nulls. shadowOnly will be removed in Mix 3.0.')
Creates a single box shadow with named parameters.
Known values chain:
shadow(.color(c).offset(x: x, y: y).blurRadius(b).spreadRadius(s)).
offset() fills a missing axis with 0, so a nullable offset must use
shadow(BoxShadowMix(...)) instead. This helper has no blur style.
Implementation
@Deprecated(
'Use shadow(.color(c).offset(x: x, y: y).blurRadius(b).spreadRadius(s)) for known values, or shadow(BoxShadowMix(...)) when forwarding nulls. shadowOnly will be removed in Mix 3.0.',
)
T shadowOnly({
Color? color,
Offset? offset,
double? blurRadius,
double? spreadRadius,
}) {
final shadow = BoxShadowMix(
color: color,
offset: offset,
blurRadius: blurRadius,
spreadRadius: spreadRadius,
);
return decoration(BoxDecorationMix.boxShadow([shadow]));
}