LinkPreviewOptions class final

Options to be used for generation of a link preview

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

LinkPreviewOptions({required bool isDisabled, required String url, required bool forceSmallMedia, required bool forceLargeMedia, required bool showAboveText})

Properties

forceLargeMedia → bool
forceLargeMedia True, if shown media preview must be large; ignored in secret chats or if the URL isn't explicitly specified
final
forceSmallMedia → bool
forceSmallMedia 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 setteroverride
isDisabled → bool
isDisabled True, if link preview must be disabled
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showAboveText → bool
showAboveText 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 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

Available on LinkPreviewOptions, provided by the LinkPreviewOptionsExtensions 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) → LinkPreviewOptions?

Constants

constructor → const String