PathUtils class

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

buildPath(List<String> segments) → String
buildPath('chats', '123') -> '/chats/123'; buildPath([]) -> '/'.
extractFirstSegment(String fullPath) → String
'/chats/123/details' -> 'chats'; '/' -> ''.
getFeatureConfiguration({required String fullPath, required List<FeatureNavigationConfiguration> featureConfigurations}) → FeatureNavigationConfiguration?
getPathDepth(String path) → int
Number of navigation levels: '/' -> 1, '/chats' -> 2 (level2), '/chats/123' -> 3 (level3), '/chats/123/details' -> 4 (level4).
getPathSegments(String fullPath) → List<String>
'/chats/123/details' -> 'chats', '123', 'details'; drops empty segments and query parameters.
getSegmentAt(String fullPath, int index) → String?
isSubPath(String fullPath, String basePath) → bool
normalizeForCache(String fullPath) → String
Builds a stable cache key: drops query/fragment, keeps the feature name and the last "static" segment, and excludes dynamic-looking segments (anything containing a digit, e.g. chat_7, 123).
quantizeWidth(double width, {int step = 24}) → int
Buckets width into steps (default 24px) to limit cache key cardinality without losing meaningful layout precision.
removeLastSegment(String fullPath) → String
startsWithPath(String fullPath, String basePath) → bool