allan.conda
05/21/2021, 2:17 PMscreenA/itemId/userId/someToken
Or is below better even though the syntax is for optional arguments…
screenA/itemId?userId={userId}&someToken={someToken}
Ian Lake
05/21/2021, 2:22 PMallan.conda
05/21/2021, 4:25 PMIan Lake
05/21/2021, 4:32 PMuserId
and a someToken
sound like things that should be injected in and controlled centrally, not something you'd pass as arguments at allpawegio
05/24/2021, 7:00 AMprivate fun String.withParams(vararg params: String): String =
"$this?" + params.joinToString("&") { param -> "$param={$param}" }
and I call:
Destinations.ScreenA.withParams(Param.A, Param.B)
to declare the route.