Skip to content

Instantly share code, notes, and snippets.

@skydoves
Created March 28, 2026 01:14
Show Gist options
  • Select an option

  • Save skydoves/ac319308cc7ca205043ea2d7890265f2 to your computer and use it in GitHub Desktop.

Select an option

Save skydoves/ac319308cc7ca205043ea2d7890265f2 to your computer and use it in GitHub Desktop.
ShimmerPlugin implementation
@Immutable
public data class ShimmerPlugin(
val shimmer: Shimmer = Shimmer.Flash(
baseColor = Color.DarkGray,
highlightColor = Color.LightGray,
),
) : ImagePlugin.LoadingStatePlugin {
@Composable
override fun compose(
modifier: Modifier,
imageOptions: ImageOptions,
executor: @Composable (IntSize) -> Unit,
): ImagePlugin = apply {
ShimmerContainer(
modifier = modifier,
shimmer = shimmer,
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment