toLocator method
Implementation
Locator toLocator() {
List<String> components = href.split("#");
String? fragment = (components.length > 1) ? components[1] : null;
return Locator(
href: components.firstOrDefault(href),
type: type ?? "",
title: title,
locations: Locations(fragments: fragment?.let((it) => [it]) ?? []),
);
}