match method

Function? match(
  1. String path
)

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;
}