HeadInjector class

Clean, deduplicating HTML document head tag injector. Ensures valid HTML5 document structure, unique SEO metadata, and zero malformed tags.

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

computeJsonLdEntityKeys(dynamic data) → Set<String>
Computes a set of entity identity keys for a JSON-LD payload. Used to distinguish different entities sharing the same @type (e.g. multiple Products or Articles).
injectTags({required Document document, required List<HeadTag> tags}) → void
Injects tags into document, replacing template defaults, eliminating duplicates, and ensuring valid HTML5 hierarchy.
isSameJsonLdEntity(Map<String, dynamic> a, Map<String, dynamic> b) → bool
Determines if two JSON-LD entity maps represent the exact same entity. Handles matching on @id, stable domain identifiers (SKU, identifier, GTIN, ISBN, MPN), canonical URLs, or entity names, while accommodating changing prices, descriptions, and URLs.