From f37ce708840b7511f49dbb6f74e3a36ecad8481d Mon Sep 17 00:00:00 2001 From: Adam Tran Date: Tue, 15 Feb 2022 14:13:49 -0500 Subject: [PATCH] Support parameters for default route --- lib/src/tree.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/tree.dart b/lib/src/tree.dart index 9f21567..8055510 100644 --- a/lib/src/tree.dart +++ b/lib/src/tree.dart @@ -121,8 +121,8 @@ class RouteTree { var components = usePath.split("/"); - if (path == Navigator.defaultRouteName) { - components = ["/"]; + if (RegExp(r"(\/$|\/\?.*)").hasMatch(path)) { + components = [path]; } var nodeMatches = {};