angularGradientBackground

Function

Android
public fun CurvedModifier.angularGradientBackground(
    vararg colorStops: Pair<Float, Color>,
    cap: StrokeCap = StrokeCap.Butt,
): CurvedModifier

Specifies a sweep gradient background for a curved element.

Parameters

colorStopsColors and their offset in the gradient area. Note that the offsets should be in ascending order. 0 means where the curved element starts laying out, 1 means the end
capHow to start and end the background.
Android
public fun CurvedModifier.angularGradientBackground(
    colors: List<Color>,
    cap: StrokeCap = StrokeCap.Butt,
): CurvedModifier

Specifies a sweep gradient background for a curved element.

Parameters

colorsColors in the gradient area. Gradient goes in the clockwise direction.
capHow to start and end the background.