matches method
Check if this route matches the given method and path
Implementation
bool matches(HttpMethod method, String path) {
if (this.method != method) return false;
if (pathPattern != null) {
return pathPattern!.hasMatch(path);
}
return this.path == path;
}