MastodonPreviewCard class
Preview card for a link.
Corresponds to the response from GET /api/v1/statuses/:id/card.
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake)
Constructors
-
MastodonPreviewCard({required String url, required String title, required String description, required MastodonPreviewCardType type, required String authorName, required String authorUrl, required String providerName, required String providerUrl, required String html, required int width, required int height, required String embedUrl, required List<
MastodonPreviewCardAuthor> authors, String? image, String? blurhash}) -
const
-
MastodonPreviewCard.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
Name of the content author.
final
-
List of content authors (Mastodon 4.3.0+).
final
-
URL of the content author.
final
- blurhash → String?
-
Blurhash string for the thumbnail.
nullif not available.final - description → String
-
Description of the preview.
final
- embedUrl → String
-
URL for embedding photos.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
Height of the preview in pixels.
final
- html → String
-
HTML for generating the preview.
final
- image → String?
-
URL of the preview thumbnail.
nullif not available.final - providerName → String
-
Name of the content provider.
final
- providerUrl → String
-
URL of the content provider.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
Title of the link target.
final
- type → MastodonPreviewCardType
-
Type of the preview card.
final
- url → String
-
URL of the link target.
final
- width → int
-
Width of the preview in pixels.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited