Hi everyone, while working with Jetpack Navigation...
# feed
f
Hi everyone, while working with Jetpack Navigation I have a lot of boilerplate and repeated code, sometimes it can be typo mistake that takes me a long time to check. So I have implemented a library to generate the code for the Route of Jetpack Compose Navigation. I hope that you can give it a try and share your feedback. https://github.com/frank-nhatvm/jnav
Copy code
@Composable
@JNav(
    name = "CartScreenNavigation",
    baseRoute = "cart_route",
    destination = "cart_destination",
    arguments = [
        JNavArg(name = "productName", type = String::class),
        JNavArg(name = "productId", type = Int::class),
        JNavArg(name = "productPrice", type = Float::class)
    ]
)
fun CartScreen(
    productName: String,
    productId: Int,
    productPrice: Float
) { }
K 4
d
Did you try #compose-destinations?