shadowOnly method

  1. @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({
  1. Color? color,
  2. Offset? offset,
  3. double? blurRadius,
  4. double? spreadRadius,
})

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]));
}