LocationBase location

The current location of this window.

Location currentLocation = window.location;
print(currentLocation.href); // 'http://www.example.com:80/'

Source

LocationBase get location;