shadow

fun Modifier.shadow(color: Color = Color.Black, offsetX: Dp = 0.dp, offsetY: Dp = 0.dp, blurRadius: Dp = 0.dp): Modifier

Deprecated

Use Modifier.shadow instead

Replace with

this.shadow(color, offsetX, offsetY, blurRadius)

Draws a custom drop shadow behind the content using hardware-accelerated/canvas blur.

Uses drawWithCache to avoid paint and mask filter allocations on every frame.

Parameters

color

The color of the shadow.

offsetX

The horizontal offset of the shadow.

offsetY

The vertical offset of the shadow.

blurRadius

The blur radius of the shadow.