LinkPreviewOptions class abstract
Describes the options used for link preview generation.
- Annotations
-
- @freezed
Constructors
- LinkPreviewOptions.new({@JsonKey(name: 'is_disabled') bool? isDisabled, @JsonKey(name: 'url') String? url, @JsonKey(name: 'prefer_small_media') bool? preferSmallMedia, @JsonKey(name: 'prefer_large_media') bool? preferLargeMedia, @JsonKey(name: 'show_above_text') bool? showAboveText})
-
Constructs an instance of LinkPreviewOptions.
constfactory
-
LinkPreviewOptions.fromJson(Map<
String, dynamic> json) -
Creates an instance of LinkPreviewOptions from JSON data.
factory
Properties
-
copyWith
→ $LinkPreviewOptionsCopyWith<
LinkPreviewOptions> -
Create a copy of LinkPreviewOptions
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisabled → bool?
-
Optional. True, if the link preview is disabled
no setterinherited
- preferLargeMedia → bool?
-
Optional. True, if the media in the link preview is supposed to be
enlarged; ignored if the URL isn't explicitly specified or media size
change isn't supported for the preview
no setterinherited
- preferSmallMedia → bool?
-
Optional. True, if the media in the link preview is supposed to be
shrunk; ignored if the URL isn't explicitly specified or media size
change isn't supported for the preview
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showAboveText → bool?
-
Optional. True, if the link preview must be shown above the message
text; otherwise, the link preview will be shown below the message text
no setterinherited
- url → String?
-
Optional. URL to use for the link preview. If empty, then the first URL
found in the message text will be used
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this LinkPreviewOptions to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited