LinkPreviewOptions class final

Options to be used for generation of a link preview

Inheritance

Constructors

LinkPreviewOptions({required bool isDisabled, required String url, required bool forceSmallMedia, required bool forceLargeMedia, required bool showAboveText})
Options to be used for generation of a link preview
const
LinkPreviewOptions.fromJson(Map<String, dynamic> json)
Parses a LinkPreviewOptions from TDLib JSON.
factory

Properties

clientId → int?
Identifier of the TDLib client that sent this object, when known.
no setterinherited
extra → dynamic
"@extra" of the request this object answers; null for updates.
no setterinherited
forceLargeMedia → bool
True, if shown media preview must be large; ignored in secret chats or if the URL isn't explicitly specified
final
forceSmallMedia → bool
True, if shown media preview must be small; ignored in secret chats or if the URL isn't explicitly specified
final
hashCode → int
The hash code for this object.
no setterinherited
isDisabled → bool
True, if link preview must be disabled
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showAboveText → bool
True, if link preview must be shown above message text; otherwise, the link preview will be shown below the message text; ignored in secret chats
final
url → String
URL to use for link preview. If empty, then the first URL found in the message text will be used
final

Methods

copyWith({bool? isDisabled, String? url, bool? forceSmallMedia, bool? forceLargeMedia, bool? showAboveText}) → LinkPreviewOptions
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.