Created
March 28, 2026 01:14
-
-
Save skydoves/1874c6279dcdb136e11125be606ef529 to your computer and use it in GitHub Desktop.
PlaceholderPlugin.Loading implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public data class Loading(val source: Any?) : | |
| PlaceholderPlugin(), | |
| ImagePlugin.LoadingStatePlugin { | |
| @Composable | |
| override fun compose( | |
| modifier: Modifier, | |
| imageOptions: ImageOptions, | |
| executor: @Composable (IntSize) -> Unit, | |
| ): ImagePlugin = apply { | |
| if (source != null) { | |
| ImageBySource( | |
| source = source, | |
| modifier = modifier, | |
| alignment = imageOptions.alignment, | |
| contentDescription = imageOptions.contentDescription, | |
| contentScale = imageOptions.contentScale, | |
| colorFilter = imageOptions.colorFilter, | |
| alpha = imageOptions.alpha, | |
| ) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment