Android 12 Developer Preview is here! Try it out, and give us your feedback!

LinearGradient

@Immutable class LinearGradient : ShaderBrush
kotlin.Any
   ↳ androidx.compose.ui.graphics.Brush
   ↳ androidx.compose.ui.graphics.ShaderBrush
   ↳ androidx.compose.ui.graphics.LinearGradient

Brush implementation used to apply a linear gradient on a given Paint

Summary

Public methods
Shader

Boolean
equals(other: Any?)

Int

String

Inherited functions

Public methods

createShader

fun createShader(size: Size): Shader

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String