Link class

Represents an element of the links array in a Thing Description.

A link can be viewed as a statement of the form "link context has a relation type resource at link target", where the optional target attributes may further describe the resource.

Annotations
  • @immutable

Constructors

Link(Uri href, {String? type, String? rel, Uri? anchor, String? sizes, List<String>? hreflang, Map<String, dynamic> additionalFields = const {}})
Constructor.
const
Link.fromJson(Map<String, dynamic> json, PrefixMapping prefixMapping)
Creates a new Link from a json object.
factory

Properties

additionalFields → Map<String, dynamic>
Additional fields collected during the parsing of a JSON object.
final
anchor → Uri?
Overrides the link context (by default the Thing itself identified by its id) with the given URI or IRI.
final
hashCode → int
The hash code for this object.
no setterinherited
href → Uri
Target IRI of a link or submission target of a form.
final
hreflang → List<String>?
The hreflang attribute specifies the language of a linked document.
final
rel → String?
A link relation type identifies the semantics of a link.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizes → String?
Target attribute that specifies one or more sizes for a referenced icon.
final
type → String?
Target attribute providing a hint indicating what the media type (see RFC 2046) of the result of dereferencing the link should be.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this class object into a JSON value.
toString() → String
A string representation of this object.
inherited

Operators

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