Match

data class Match(val route: Route, val routeParams: Map<String, String>, val queryParams: Map<String, String>)

Represents a route match

Constructors

Link copied to clipboard
fun Match(route: Route, routeParams: Map<String, String>, queryParams: Map<String, String>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
operator fun get(key: String): String

Gets the route param with the given key / name

Link copied to clipboard
fun param(name: String, default: String = ""): String

Gets the route param with the given name or defaults to default

Link copied to clipboard
fun withQueryParams(vararg params: Pair<String, String?>): Route.Match

Returns a new instance with the query params set

Properties

Link copied to clipboard

Combination of route and query params

Link copied to clipboard

Shortcut to the pattern of the route

Link copied to clipboard

Query params after like ?p=1&t=2

Link copied to clipboard

The route that was matched

Link copied to clipboard

Route params extract from url placeholder