Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mounting dynamic routes. FIxes #250 #288

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
lints
  • Loading branch information
davidmartos96 committed Sep 15, 2022
commit c1d4d07c881ebf2ef1f3e834baf263c1ace9a765
4 changes: 2 additions & 2 deletions pkgs/shelf_router/lib/src/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class Router {

if (prefix.endsWith('/')) {
_all(
prefix + '<$restPathParam|[^]*>',
'$prefix<$restPathParam|[^]*>',
(Request request, RouterEntry route) {
// Remove path param from extracted route params
final paramsList = [...route.params]..removeLast();
Expand All @@ -222,7 +222,7 @@ class Router {
applyParamsOnHandle: false,
);
_all(
prefix + '/<$restPathParam|[^]*>',
'$prefix/<$restPathParam|[^]*>',
(Request request, RouterEntry route) {
// Remove path param from extracted route params
final paramsList = [...route.params]..removeLast();
Expand Down