path property

String get path

Implementation

String get path {
  List<String> pathSegments = [...url.pathSegments];
  if (pathSegments.isNotEmpty) {
    pathSegments.removeAt(0);
  } else {
    pathSegments = ["/"];
  }
  String path_url = url.replace(pathSegments: pathSegments).path;
  if (path_url.isEmpty) {
    return "/";
  }
  return path_url;
}