LinkPreview class abstract
Represents information of link preview.
- Available extensions
- Annotations
-
- @freezed
Constructors
- LinkPreview.new({String? url, String? title, String? description, String? image})
-
constfactory
-
LinkPreview.fromJson(Map<
String, Object?> json) -
factory
Properties
-
copyWith
→ $LinkPreviewCopyWith<
LinkPreview> -
Create a copy of LinkPreview
with the given fields replaced by the non-null parameter values.
no setterinherited
- description → String?
-
The preview description of the link.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- image → String?
-
The preview image of the link.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String?
-
The preview title of the link.
no setterinherited
- url → String?
-
The preview url if the link.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_LinkPreview value)) → TResult -
Available on LinkPreview, provided by the LinkPreviewPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_LinkPreview value)?) → TResult? -
Available on LinkPreview, provided by the LinkPreviewPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_LinkPreview value)?, {required TResult orElse()}) → TResult -
Available on LinkPreview, provided by the LinkPreviewPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String? url, String? title, String? description, String? image)?, {required TResult orElse()}) → TResult -
Available on LinkPreview, provided by the LinkPreviewPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this LinkPreview to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String? url, String? title, String? description, String? image)) → TResult -
Available on LinkPreview, provided by the LinkPreviewPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String? url, String? title, String? description, String? image)?) → TResult? -
Available on LinkPreview, provided by the LinkPreviewPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited