ShimmerTheme

data class ShimmerTheme(val animationSpec: AnimationSpec<Float>, val blendMode: BlendMode, val rotation: Float, val shaderColors: List<Color>, val shaderColorStops: List<Float>?, val shimmerWidth: Dp)

Constructors

Link copied to clipboard
constructor(animationSpec: AnimationSpec<Float>, blendMode: BlendMode, rotation: Float, shaderColors: List<Color>, shaderColorStops: List<Float>?, shimmerWidth: Dp)

Properties

Link copied to clipboard

The AnimationSpec which will be used for the traversal. Use an infinite spec to repeat shimmering.

Link copied to clipboard

The BlendMode used in the shimmer's androidx.compose.ui.graphics.Paint. Have a look at the theming samples to get an idea on how to utilize the blend mode.

Link copied to clipboard

Describes the orientation of the shimmer in degrees. Zero is thereby defined as shimmer traversing from the left to the right. The rotation is applied clockwise. Only values >= 0 will be accepted.

Link copied to clipboard

The shaderColors can be used to control the colors and alpha values of the shimmer. The size of the list has to be kept in sync with the shaderColorStops. Consult the docs of the androidx.compose.ui.graphics.LinearGradientShader for more information and have a look at the theming samples.

Link copied to clipboard
Link copied to clipboard

Controls the width used to distribute the shaderColors.