Skip to content

Instantly share code, notes, and snippets.

@skydoves
Last active January 24, 2025 01:48
Show Gist options
  • Save skydoves/70a2b04973bf864c57652428ca402d42 to your computer and use it in GitHub Desktop.
Save skydoves/70a2b04973bf864c57652428ca402d42 to your computer and use it in GitHub Desktop.
inspection_mode
@Composable
public fun GlideImage(
imageModel: () -> Any?,
modifier: Modifier = Modifier,
previewPlaceholder: Painter? = null,
..
) {
if (LocalInspectionMode.current && previewPlaceholder != null) {
Image(
modifier = modifier,
painter = previewPlaceholder,
..
)
return
}
// complex logic about requesting network data and render it
..
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment