LinkPreview class final

Describes a link preview

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

LinkPreview({required String url, required String displayUrl, required String siteName, required String title, FormattedText? description, required String author, LinkPreviewType? type, required bool hasLargeMedia, required bool showLargeMedia, required bool showMediaAboveDescription, required bool skipConfirmation, required bool showAboveText, required int instantViewVersion})

Properties

author String
author Author of the content
final
description FormattedText?
param_description Description of the content
final
displayUrl String
displayUrl URL to display
final
hashCode int
The hash code for this object.
no setteroverride
hasLargeMedia bool
hasLargeMedia True, if size of media in the preview can be changed
final
instantViewVersion int
instantViewVersion 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
showAboveText 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
showLargeMedia 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
showMediaAboveDescription True, if media must be shown above link preview description; otherwise, the media must be shown below the description
final
siteName String
siteName Short name of the website (e.g., Google Docs, App Store)
final
skipConfirmation bool
skipConfirmation 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 Title of the content
final
type LinkPreviewType?
type Type of the link preview
final
url String
url 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}) LinkPreview

Available on LinkPreview, provided by the LinkPreviewExtensions extension

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

Operators

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

Static Methods

fromJson(Map<String, dynamic>? json) LinkPreview?

Constants

constructor → const String