ShadowLayer

data class ShadowLayer(val blur: Dp, val offsetY: Dp = 0.dp, val spread: Dp = 0.dp, val alpha: Float)(source)

One layer of a soft shadow.

Real depth is rarely one shadow. A tight, dark contact layer under a wide, faint ambient layer is what makes a card read as resting on the canvas rather than glowing above it, which is why CountryPickerShadow stacks layers.

Constructors

Link copied to clipboard
constructor(blur: Dp, offsetY: Dp = 0.dp, spread: Dp = 0.dp, alpha: Float)

Properties

Link copied to clipboard

Opacity, applied to CountryPickerColors.shadow.

Link copied to clipboard
val blur: Dp

Blur radius.

Link copied to clipboard
val offsetY: Dp

Vertical offset — light comes from above.

Link copied to clipboard
val spread: Dp

Grows (or, negative, shrinks) the shadow before blurring.