BlueskyEmbedData class
Bluesky post embed data (blockquote + embed.bsky.app widget script).
- Inheritance
-
- Object
- SocialMediaGenericEmbedData
- BlueskyEmbedData
Constructors
- BlueskyEmbedData({required String embedHtml, String? pendingPostUrl})
-
Creates an instance of the embed data.
const
Properties
- aspectRatio → double?
-
Aspect ratio of the embed
finalinherited
- canChangeSize → bool
-
Whether the embed can change size after being loaded or not
finalinherited
- embedHtml → String
-
Blockquote markup (script tag is appended via htmlScript).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- htmlBaseUrl → String
-
Base URL for
WebViewController.loadHtmlString, giving the page a real origin. When null, HTML is loaded via a data URI instead.no setteroverride - htmlBody → String
-
The HTML of the embed
no setteroverride
- htmlScript → String
-
Computed script tag to load on the embed
no setterinherited
- htmlScriptUrl → String
-
The JS script to load on the embed
no setteroverride
- needsOEmbed → bool
-
Whether oEmbed must be fetched from pendingPostUrl first.
no setter
- pendingPostUrl → String?
-
When set, fetchOEmbedHtml must be called before rendering.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
extractPostUrl(
String embedHtml) → String? -
Extracts a
bsky.app/profile/.../post/...URL from markup or plain text. -
fallbackEmbedHtml(
String postUrl) → String - Minimal fallback when oEmbed is unavailable.
-
fetchOEmbedHtml(
String postUrl) → Future< String?> - Fetches the official embed HTML snippet from Bluesky oEmbed.
-
fromMarkup(
String embedHtml) → BlueskyEmbedData? - Builds embed data from CMS markup or a bsky.app post URL.
-
normalizeEmbedHtml(
String embedHtml) → String - Strips duplicate widget scripts; oEmbed HTML includes one already.