A simple, flexible QR code renderer for Jetpack Compose - by Lightspark
First install it from Maven Central:
Groovy:
dependencies {
implementation "com.lightspark:compose-qr-code:1.0.1"
}
kts:
dependencies {
implementation("com.lightspark:compose-qr-code:1.0.1")
}
Then, use it in your code! Here's a plain ol' boring QR Code:
@Composable
fun BoringPreview() {
QrCodeView(
data = "https://github.com/lightsparkdev/compose-qr-code",
modifier = Modifier.size(300.dp)
)
} |
Meh... Let's spice it up a bit with a smiley face overlay:
Cool, I guess we're getting somewhere. What about dark mode? Maybe we can also add some style with circular dots in the qr code...
That's not bad! Let's add some even cooler styles, though. cracks fingers...
This libraries relies on the great, reliable zxing library for QR code data generation.