MetaTag class

Represents a single HTML meta tag.

Can represent both <meta name="..." content="..."> and <meta property="..." content="..."> tags.

MetaTag(name: 'description', content: 'My page description')
MetaTag(property: 'og:title', content: 'My Page')

Constructors

MetaTag({String? name, String? property, required String content, String? httpEquiv})
const
MetaTag.httpEquiv({required String httpEquiv, required String content})
Create an http-equiv meta tag
const
MetaTag.name({required String name, required String content})
Create a name-based meta tag
const
MetaTag.property({required String property, required String content})
Create a property-based meta tag (e.g., Open Graph)
const

Properties

content → String
The content value
final
hashCode → int
The hash code for this object.
no setteroverride
httpEquiv → String?
The http-equiv attribute (for HTTP header simulation)
final
key → String
The key used to identify this tag (name, property, or httpEquiv)
no setter
name → String?
The name attribute (for standard meta tags)
final
property → String?
The property attribute (for Open Graph tags)
final
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.
override

Operators

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