normalizedPath property
String
get
normalizedPath
Path normalized for runtime matching.
Implementation
String get normalizedPath {
if (path == '/') {
return '/';
}
final trimmed = path.startsWith('/') ? path : '/$path';
return trimmed.endsWith('/') && trimmed.length > 1
? trimmed.substring(0, trimmed.length - 1)
: trimmed;
}