Is there a way to provide some `@Preview` placehol...
# compose
d
Is there a way to provide some
@Preview
placeholder feature? For instance if I'm creating a custom
Painter
and I want to provide a preview for that? Example: I've a QRCode to be generated and I want to provide a preview that look like a QRCode without actually running the code to generate it
z
There’s no way to magically replace the content of an arbitrary composable. I think you’d have to write a separate fake QR code composable and use that in your preview.
d
I suppose Coil and any other libraries for image loading have the same problem with previews
It is actually possible:
Copy code
if (LocalInspectionMode.current) {
  // inspection mode (preview)
}
@Zach Klippenstein (he/him) [MOD] ^