parsePattern method
Implementation
String parsePattern(String path) {
String getPattern = "";
if (path == "/") {
getPattern = "^${path}\$";
} else {
if (!RegExp(r"^(/)").hasMatch(path)) {
getPattern = "^/${path}";
} else {
getPattern = path;
}
}
return getPattern;
}