RouteMask.of constructor

RouteMask.of(
  1. String? path, [
  2. String? identifier
])

Implementation

factory RouteMask.of(String? path, [String? identifier]) => path == null
    ? empty
    : (path == '/'
        ? root
        : RouteMask._(
            _PathSegment.chain(Uri.parse(path, 0,
                    path.endsWith('/') ? path.length - 1 : path.length)
                .pathSegments),
            identifier ?? path));