LinearGradientAsset
data class LinearGradientAsset(val colors: List<String>, val stops: List<Float>? = null, val startX: Float = 0.0f, val startY: Float = 0.0f, val endX: Float = 1.0f, val endY: Float = 1.0f) : AdaptyCustomAsset
Defines a linear gradient composed of multiple colors.
Example:
AdaptyCustomAsset.LinearGradientAsset(
colors = listOf("#FF512F", "#DD2476"),
stops = listOf(0.0f, 1.0f)
)Content copied to clipboard
Parameters
colors
list of HEX color strings (e.g., "#FF0000").
stops
optional list of color stops in the range 0.0–1.0.
startX
gradient start X coordinate.
startY
gradient start Y coordinate.
endX
gradient end X coordinate.
endY
gradient end Y coordinate.