match method
Implementation
Function? match(String path) {
for (var route in _routes) {
if (_matchRoute(route.pattern, path)) {
var params = _extractParams(route.pattern, path);
return () => route.action(params);
}
}
return null;
}