Path parameter | Query parameter | |
---|---|---|
Used for | required arguments | optional arguments collections (arrays and lists) |
Example fields | val id: String val code: Int? |
val color: String? = null val variants: List<String> = emptyList() |
Generated URL format | /{id}/{code} |
?color={color}&variants={variant1}&variants={variant2} |
Example URL | product/ABC/123 |
product?color=red&variants=small&variants=medium |
Last active
September 13, 2024 14:04
-
-
Save dturner/01dc1341ffb417f07a8c1c913bf4d7ae to your computer and use it in GitHub Desktop.
AndroidX Navigation URI parameters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good spot, thank you! Fixed.