Url class

The interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL. You normally create a new object by specifying the URL as a string when calling its constructor, or by providing a relative URL and a base URL. You can then easily read the parsed components of the URL or make changes to the URL. If a browser doesn't yet support the URL() constructor, you can access a URL object using the Window interface's property. Be sure to check to see if any of your target browsers require this to be prefixed. Note: This feature is available in Web Workers

Available extensions
Annotations
  • @JS('URL')
  • @staticInterop

Constructors

Url(String url, [String? base])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

createObjectURL(dynamic obj) String
revokeObjectURL(String url) → void