ArticleSchema class

Schema.org Article structured data.

Supports Article, NewsArticle, and BlogPosting types. Helps Google show rich results for your articles.

ArticleSchema(
  headline: 'How to Use Flutter Web SEO',
  description: 'A complete guide to SEO in Flutter Web apps',
  datePublished: '2025-06-01',
  author: ArticleAuthor(name: 'John Doe', url: 'https://...'),
  publisher: ArticlePublisher(
    name: 'My Blog',
    logoUrl: 'https://myblog.com/logo.png',
  ),
  image: 'https://myblog.com/article-image.jpg',
)

See: https://schema.org/Article

Inheritance

Constructors

ArticleSchema({required String headline, String? description, String? image, String? datePublished, String? dateModified, ArticleAuthor? author, ArticlePublisher? publisher, List<String>? keywords, String? articleBody, String? articleSection, int? wordCount, String? url, ArticleType articleType = ArticleType.article})
const

Properties

articleBody → String?
final
articleSection → String?
final
articleType → ArticleType
The schema.org type: 'Article', 'NewsArticle', or 'BlogPosting'
final
author → ArticleAuthor?
final
dateModified → String?
final
datePublished → String?
final
description → String?
final
hashCode → int
The hash code for this object.
no setterinherited
headline → String
final
image → String?
final
keywords → List<String>?
final
publisher → ArticlePublisher?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
url → String?
final
wordCount → int?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJsonLd() → String
Convert to a complete JSON-LD string with @context.
inherited
toJsonLdMinified() → String
Convert to a minified JSON-LD string (no extra whitespace).
inherited
toMap() → Map<String, dynamic>
Convert this schema to a map (without @context). Subclasses must implement this.
override
toString() → String
A string representation of this object.
inherited

Operators

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