Card class

Represents a rich preview card that is generated using OpenGraph tags from a URL. https://docs.joinmastodon.org/entities/PreviewCard/

Annotations
  • @JsonSerializable()

Constructors

Card({required Uri url, required String title, required String description, required Uri? image, required CardType type, required String? authorName, required Uri? authorUrl, required String? providerName, required Uri? providerUrl, required String? html, required int? width, required int? height, required Uri embedUrl, required String? blurhash})
Card.fromJson(Map<String, dynamic> json)
factory

Properties

authorName String?
The author of the original resource
final
authorUrl Uri?
A link to the author of the original resource
final
blurhash String?
A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet.
final
description String
Description of preview
final
embedUrl Uri
Used for photo embeds, instead of custom html
final
hashCode int
The hash code for this object.
no setterinherited
height int?
Height of preview, in pixels
final
html String?
HTML to be used for generating the preview card
final
image Uri?
Preview thumbnail
final
providerName String?
The provider of the original resource
final
providerUrl Uri?
A link to the provider of the original resource
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
Title of linked resource
final
type CardType
The type of the preview card. Enumerated by CardType
final
url Uri
Location of linked resource
final
width int?
Width of preview, in pixels
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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