TwitterCardConfig class
Twitter/X Card meta tags configuration.
Controls how your page appears when shared on Twitter/X.
TwitterCardConfig(
card: TwitterCardType.summaryLargeImage,
title: 'My Product',
description: 'Amazing product description',
image: 'https://example.com/twitter-card.png',
site: '@mycompany',
creator: '@author',
)
See: https://developer.twitter.com/en/docs/twitter-for-websites/cards
Constructors
Properties
- card → TwitterCardType
-
The card type
final
- creator → String?
-
twitter:creator — @username of the content creator
final
- description → String?
-
twitter:description — The description (max 200 chars)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- image → String?
-
twitter:image — URL to the card image
final
- imageAlt → String?
-
twitter:image:alt — Alt text for the image
final
- player → String?
-
twitter:player — URL to the player iframe (for player cards)
final
- playerHeight → String?
-
twitter:player:height — Height of the player
final
- playerWidth → String?
-
twitter:player:width — Width of the player
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- site → String?
-
twitter:site — @username of the website
final
- title → String?
-
twitter:title — The title (max 70 chars)
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 name -> content pairs
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited