toString method

  1. @override
String toString()
override

Returns a string containing the whole URL. It is a synonym for URL.href, though it can't be used to modify the value.

MDN reference

Implementation

@override
String toString() => href;