MetaEntry class
A meta tag.
Supports all meta tag variants:
<meta charset="..."><meta name="..." content="..."><meta property="..." content="..."><meta http-equiv="..." content="...">
MetaEntry.charset('utf-8')
MetaEntry.name('description', 'Page description')
MetaEntry.property('og:title', 'Open Graph Title')
MetaEntry.viewport('width=device-width, initial-scale=1')
Constructors
-
Author meta tag.
const
- MetaEntry.charset(String value, {HeadLayer layer = HeadLayer.component})
-
Charset meta tag.
const
- MetaEntry.content(String content, {HeadLayer layer = HeadLayer.component})
-
Content-only meta tag.
const
- MetaEntry.description(String content, {HeadLayer layer = HeadLayer.component, bool generateFallbacks = true})
-
Description meta tag with optional fallback generation.
const
- MetaEntry.httpEquiv(String equiv, String content, {HeadLayer layer = HeadLayer.component})
-
HTTP-equiv meta tag.
const
-
MetaEntry.keywords(List<
String> keywords, {HeadLayer layer = HeadLayer.component}) - Keywords meta tag.
- MetaEntry.name(String name, String content, {HeadLayer layer = HeadLayer.component, bool generateFallbacks = false})
-
Named meta tag (e.g., description, author, robots).
const
- MetaEntry.property(String property, String content, {HeadLayer layer = HeadLayer.component})
-
Property meta tag (e.g., og:title, og:image).
const
- MetaEntry.robots(String content, {HeadLayer layer = HeadLayer.component})
-
Robots meta tag.
const
- MetaEntry.themeColor(String color, {HeadLayer layer = HeadLayer.component})
-
Theme color meta tag.
const
- MetaEntry.viewport(String content, {HeadLayer layer = HeadLayer.component})
-
Viewport meta tag.
const
Properties
- category → HeadCategory
-
Category for grouping related tags.
finalinherited
- charset → String?
-
final
- content → String?
-
final
- generateFallbacks → bool
-
Whether to auto-generate og:description/twitter:description fallbacks.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpEquiv → String?
-
final
- key → String
-
Unique identifier for deduplication.
Tags with the same key from higher layers override lower layers.
finalinherited
- layer → HeadLayer
-
Priority layer for resolution.
finalinherited
- name → String?
-
final
- property → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWithLayer(
HeadLayer layer) → MetaEntry -
Creates a copy with a different layer.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toHtml(
) → String -
Renders this entry to an HTML string.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited