SeoPage class

A complete server-rendered page: head metadata plus a semantic HTML body.

SeoPage(
  meta: SeoMeta(title: 'Willkommen', description: '...'),
  bodyHtml: '<h1>Willkommen</h1><p>Flutter mit echtem SEO.</p>',
);

The body can also be built from SeoNodes via SeoPage.fromNodes - then all text is escaped by the HtmlRenderer, exactly like in the Flutter app. SeoPage.visibleFromNodes creates a standalone, visible page with optional package-owned progressive interactions. SeoPage.domFirstFromNodes creates a permanent semantic page with separately selected compiled capabilities.

Constructors

SeoPage({SeoMeta? meta, required String bodyHtml, String lang = 'en'})
SeoPage.domFirstFromNodes({SeoMeta? meta, required List<SeoNode> body, String lang = 'en', String? stylesheet = seoDefaultStylesheet, Set<SeoDomFirstFeature> features = const {}, String? interactionNonce, SeoDomFirstRuntimeArtifact? applicationRuntime})
Builds a permanent semantic page without a Flutter browser runtime.
SeoPage.fromNodes({SeoMeta? meta, required List<SeoNode> body, String lang = 'en'})
Builds the body from SeoNodes using the same renderer as the Flutter side.
SeoPage.visibleFromNodes({SeoMeta? meta, required List<SeoNode> body, String lang = 'en', String? stylesheet = seoDefaultStylesheet, bool enableInteractions = true, String? interactionNonce})
Builds a standalone page whose semantic body is visible without Flutter.

Properties

applicationRuntime SeoDomFirstRuntimeArtifact?
A separately built and verified application transition for this page.
final
bodyHtml String
The semantic HTML body written into the document.
final
domFirstFeatures Set<SeoDomFirstFeature>
Compiled behaviours selected for a permanent DOM-first page.
final
enableInteractions bool
Whether to include the trusted package interaction runtime.
final
hashCode int
The hash code for this object.
no setterinherited
interactionNonce String?
Optional CSP nonce placed on package-generated style and script tags.
final
lang String
The lang attribute of the <html> element, e.g. de.
final
meta SeoMeta
Head metadata: title, description, OpenGraph, JSON-LD schemas.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stylesheet String?
Optional inline CSS for a visible semantic page.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toHtmlDocument() String
Renders the complete HTML document.
toString() String
A string representation of this object.
inherited

Operators

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