RouteBuilder
Use the DSL functions to build the expected route handled by a Router. If two routes match the same path, the first declared route is chosen.
With dynamic routing displaying will not stop if two routes of the same kind match the current route:
wrong usage:
if (true) {
int {
Text("Match")
}
}
int {
Text("Will be displayed too")
}
Content copied to clipboard
correct usage:
if (true) {
int {
Text("Match")
}
} else {
int {
Text("Won't be displayed")
}
}
Content copied to clipboard
Types
Functions
Link copied to clipboard
Executes the given block inside RouteEffect when the route matches the int.
Link copied to clipboard
Fallback if no matching route is found.
Link copied to clipboard
Executes the given block inside RouteEffect when the route doesn't match.
Link copied to clipboard
@Composable
Executes the given block inside RouteEffect when the route matches the given path.
Link copied to clipboard
Executes the given block inside RouteEffect when the route matches the string.