Skip to content

Commit

Permalink
Support parameters for default route
Browse files Browse the repository at this point in the history
  • Loading branch information
atrancandoris committed Feb 15, 2022
1 parent 00e05fe commit f37ce70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/tree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ class RouteTree {

var components = usePath.split("/");

if (path == Navigator.defaultRouteName) {
components = ["/"];
if (RegExp(r"(\/$|\/\?.*)").hasMatch(path)) {
components = [path];
}

var nodeMatches = <RouteTreeNode, RouteTreeNodeMatch>{};
Expand Down

0 comments on commit f37ce70

Please sign in to comment.