location property
The current location, including the optional per-entry RouteInformation.state.
Implementation
@override
RouteInformation get location {
final web.Location(:pathname, :search, :hash) = window.location;
final uri = Uri(
path: pathname.startsWith('/') ? pathname : '/$pathname',
query: search.startsWith('?') ? search.substring(1) : search,
fragment: hash.startsWith('#') ? hash.substring(1) : hash,
);
return RouteInformation(uri: uri, state: state?.userData);
}