OgTags class

Open Graph protocol meta tags configuration.

These tags control how your page appears when shared on Facebook, LinkedIn, Discord, Slack, and other platforms.

OgTags(
  title: 'My Product',
  description: 'Amazing product description',
  image: 'https://example.com/og-image.png',
  type: OgType.product,
  url: 'https://example.com/products/my-product',
)

See: https://ogp.me/

Constructors

OgTags({String? title, String? description, String? image, String? imageWidth, String? imageHeight, String? imageAlt, OgType? type, String? url, String? siteName, String? locale, List<String>? localeAlternate, String? video, String? audio, String? determiner})
const

Properties

audio String?
og:audio — URL to audio
final
description String?
og:description — A brief description
final
determiner String?
og:determiner — The word before the title (a, an, the, auto, "")
final
hashCode int
The hash code for this object.
no setterinherited
image String?
og:image — URL to the preview image (recommended: 1200x630)
final
imageAlt String?
og:image:alt — Alt text for the image
final
imageHeight String?
og:image:height — Height of the image in pixels
final
imageWidth String?
og:image:width — Width of the image in pixels
final
locale String?
og:locale — The locale (e.g., en_US)
final
localeAlternate List<String>?
og:locale:alternate — Other available locales
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
siteName String?
og:site_name — The name of the overall site
final
title String?
og:title — The title of your page
final
type OgType?
og:type — The type of content (website, article, product, etc.)
final
url String?
og:url — The canonical URL
final
video String?
og:video — URL to a video
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, String>
Convert to a map of property -> content pairs
toString() String
A string representation of this object.
inherited

Operators

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