SeoPage class

All-in-one SEO page wrapper widget.

Wraps a page with complete SEO metadata. This is the simplest way to add SEO to any page in your Flutter Web app.

SeoPage(
  title: 'About Us',
  description: 'Learn about our company and mission',
  ogImage: 'https://example.com/about-og.png',
  canonicalUrl: 'https://example.com/about',
  structuredData: [
    BreadcrumbSchema(items: [
      BreadcrumbItem(name: 'Home', url: 'https://example.com'),
      BreadcrumbItem(name: 'About'),
    ]),
  ],
  child: AboutPageContent(),
)
Inheritance

Constructors

SeoPage({Key? key, required String title, required Widget child, String? description, String? ogImage, String? canonicalUrl, List<String>? keywords, String? author, List<JsonLdSchema>? structuredData, bool indexable = true, bool followable = true, OgTags? ogTags, TwitterCardConfig? twitterCard, Map<String, String>? customMeta, Map<String, String>? customPropertyMeta, bool trackPageView = true, List<NoscriptLink>? noscriptLinks, String? noscriptBody})
const

Properties

author → String?
Author name
final
canonicalUrl → String?
Canonical URL for this page
final
child → Widget
The page content widget
final
customMeta → Map<String, String>?
Custom name-based meta tags
final
customPropertyMeta → Map<String, String>?
Custom property-based meta tags
final
description → String?
Meta description — sets description, og:description, twitter:description
final
followable → bool
Whether search engines should follow links on this page
final
hashCode → int
The hash code for this object.
no setterinherited
indexable → bool
Whether search engines should index this page
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keywords → List<String>?
SEO keywords
final
noscriptBody → String?
Additional noscript HTML content
final
Links for noscript navigation fallback
final
ogImage → String?
OG image URL — sets og:image and twitter:image
final
ogTags → OgTags?
Open Graph configuration (overrides defaults from title/description/ogImage)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
structuredData → List<JsonLdSchema>?
JSON-LD structured data to inject
final
title → String
Page title (required) — sets
final
trackPageView → bool
Whether to track page view automatically
final
twitterCard → TwitterCardConfig?
Twitter card configuration
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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