LinkPreview class final
Describes a link preview
Constructors
- LinkPreview({required String url, required String displayUrl, required String siteName, required String title, required FormattedText description, required String author, required LinkPreviewType type, required bool hasLargeMedia, required bool showLargeMedia, required bool showMediaAboveDescription, required bool skipConfirmation, required bool showAboveText, required int instantViewVersion, dynamic extra, int? clientId})
-
Describes a link preview
const
-
LinkPreview.fromJson(Map<
String, dynamic> json) -
Parses a LinkPreview from TDLib JSON.
factory
Properties
-
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
- 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 instant view (currently, can be 1 or 2) for the web page; 0 if none
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
- showMediaAboveDescription → bool
-
True, if media must be shown above link preview description; otherwise, the media must be shown below the description
final
- siteName → String
-
Short name of the website (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
- title → String
-
Title of the content
final
- type → LinkPreviewType
-
Type of the link preview
final
- url → String
-
Original URL of the link
final
Methods
-
copyWith(
{String? url, String? displayUrl, String? siteName, String? title, FormattedText? description, String? author, LinkPreviewType? type, bool? hasLargeMedia, bool? showLargeMedia, bool? showMediaAboveDescription, bool? skipConfirmation, bool? showAboveText, int? instantViewVersion, dynamic extra, int? clientId}) → LinkPreview -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto 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.