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
fun withQueryParams(params: Map<String, String?>): Route.Match

Returns a new instance with the query params set

Properties

Link copied to clipboard
val allParams: Map<String, String>

Combination of route and query params

Link copied to clipboard
val pattern: String

Shortcut to the pattern of the route

Link copied to clipboard
val queryParams: Map<String, String>

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

Link copied to clipboard
val route: Route

The route that was matched

Link copied to clipboard
val routeParams: Map<String, String>

Route params extract from url placeholder