WebPage class final

Describes a link preview

Inheritance

Constructors

WebPage({required String url, required String displayUrl, required String type, required String siteName, required String title, required FormattedText description, Photo? photo, required String embedUrl, required String embedType, required int embedWidth, required int embedHeight, required int duration, required String author, required bool hasLargeMedia, required bool showLargeMedia, required bool skipConfirmation, required bool showAboveText, Animation? animation, Audio? audio, Document? document, Sticker? sticker, Video? video, VideoNote? videoNote, VoiceNote? voiceNote, required int storySenderChatId, required int storyId, required int instantViewVersion, dynamic extra, int? clientId})
Describes a link preview
const
WebPage.fromJson(Map<String, dynamic> json)
Parses a WebPage from TDLib JSON.
factory

Properties

animation → Animation?
Preview of the content as an animation, if available; may be null
final
audio → Audio?
Preview of the content as an audio file, if available; may be null
final
author → String
Author of the content
final
clientId → int?
Identifier of the TDLib client that sent this object.
final
description → FormattedText
Description of the content
final
displayUrl → String
URL to display
final
document → Document?
Preview of the content as a document, if available; may be null
final
duration → int
Duration of the content, in seconds
final
embedHeight → int
Height of the embedded preview
final
embedType → String
MIME type of the embedded preview, (e.g., text/html or video/mp4)
final
embedUrl → String
URL to show in the embedded preview
final
embedWidth → int
Width of the embedded preview
final
extra → dynamic
"@extra" of the request this object answers.
final
hashCode → int
The hash code for this object.
no setterinherited
hasLargeMedia → bool
True, if size of media in the preview can be changed
final
instantViewVersion → int
Version of web page instant view (currently, can be 1 or 2); 0 if none
final
photo → Photo?
Image representing the content; may be null
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showAboveText → bool
True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text
final
showLargeMedia → bool
True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos
final
siteName → String
Short name of the site (e.g., Google Docs, App Store)
final
skipConfirmation → bool
True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear
final
sticker → Sticker?
Preview of the content as a sticker for small WEBP files, if available; may be null
final
storyId → int
The identifier of the previewed story; 0 if none
final
storySenderChatId → int
The identifier of the sender of the previewed story; 0 if none
final
title → String
Title of the content
final
type → String
Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else
final
url → String
Original URL of the link
final
video → Video?
Preview of the content as a video, if available; may be null
final
videoNote → VideoNote?
Preview of the content as a video note, if available; may be null
final
voiceNote → VoiceNote?
Preview of the content as a voice note, if available; may be null
final

Methods

copyWith({String? url, String? displayUrl, String? type, String? siteName, String? title, FormattedText? description, Photo? photo()?, String? embedUrl, String? embedType, int? embedWidth, int? embedHeight, int? duration, String? author, bool? hasLargeMedia, bool? showLargeMedia, bool? skipConfirmation, bool? showAboveText, Animation? animation()?, Audio? audio()?, Document? document()?, Sticker? sticker()?, Video? video()?, VideoNote? videoNote()?, VoiceNote? voiceNote()?, int? storySenderChatId, int? storyId, int? instantViewVersion, dynamic extra, int? clientId}) → WebPage
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.