You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dart Frog supports wildcard routes. For example, if you create a file called `routes/posts/[...page].dart`, then it will be accessible at any path that starts with `/posts/`, with any number of levels, allowing it to called from `/posts/today`, `/posts/features/stared`, and so forth.
421
+
Dart Frog supports wildcard routes. For example, if you create a file called `routes/posts/[...page].dart`, then it will be accessible at any path that starts with `/posts/`, with any number of levels, allowing it to called from `/posts/today`, `/posts/features/starred`, and so forth.
422
422
423
423
Routing parameters are forwarded to the `onRequest` method as seen below:
Wildcard routes **must** be unique leaf routes on their route node, meaning that they need to be a file, and they need to be the only route in their folder.
435
+
```
435
436
436
437
## Route Conflicts π₯
437
438
@@ -442,13 +443,11 @@ A route conflict occurs when more than one route handler resolves to the same en
442
443
For example, given the following file structure:
443
444
444
445
```
445
-
446
446
βββ routes
447
447
βΒ Β βββ api
448
448
βΒ Β βΒ Β βββ index.dart
449
449
βΒ Β βββ api.dart
450
-
451
-
````
450
+
```
452
451
453
452
Both `routes/api/index.dart` and `routes/api.dart` resolve the the `/api` endpoint.
454
453
@@ -458,7 +457,7 @@ When running the development server via `dart_frog dev`, Dart Frog will report r
458
457
[hotreload] - Application reloaded.
459
458
460
459
Route conflict detected. `routes/api.dart` and `routes/api/index.dart` both resolve to `/api`.
461
-
````
460
+
```
462
461
463
462
When generating a production build via `dart_frog build`, Dart Frog will report all detected route conflicts and fail the build if one or more route conflicts are detected.
0 commit comments