location property

  1. @override
HistoryLocation get location
override

The current location.

Implementation

@override
HistoryLocation get location {
  final web.Location(:pathname, :search, :hash) = window.location;
  final path = ensureLeadingSlash(pathname);
  final uri = Uri(
    path: stripBase(path, base),
    query: search.startsWith('?') ? search.substring(1) : search,
    fragment: hash.startsWith('#') ? hash.substring(1) : hash,
  );
  return HistoryLocation(uri, state?.userData);
}