removePage method
Implementation
Uri removePage() {
// url is a data uri?
if (data != null) return this;
// remove empty segments
List<String> pathSegments = this.pathSegments.toList();
if (page != null) {
pathSegments.removeLast();
// build a new uri
return replace(pathSegments: pathSegments);
}
return this;
}