LinkPreview class abstract

Represents information of link preview.

Available extensions
Annotations
  • @freezed

Constructors

LinkPreview({String? url, String? title, String? description, String? image, String? error, @JsonKey.new(name: 'likely_type') String? likelyType})
const
factory
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
error → String?
The error message returned by cardyb, if any.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
image → String?
The preview image of the link.
no setterinherited
likelyType → String?
The likely type of the resource cardyb attempted to extract (e.g. html), mapped from the likely_type field.
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

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_LinkPreview value)?) → TResult?

Available on LinkPreview, provided by the LinkPreviewPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_LinkPreview value)?, {required TResult orElse()}) → TResult

Available on LinkPreview, provided by the LinkPreviewPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String? url, String? title, String? description, String? image, String? error, String? likelyType)?, {required TResult orElse()}) → TResult

Available on LinkPreview, provided by the LinkPreviewPatterns extension

A variant of when that fallback to an orElse 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, String? error, String? likelyType)) → TResult

Available on LinkPreview, provided by the LinkPreviewPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String? url, String? title, String? description, String? image, String? error, String? likelyType)?) → TResult?

Available on LinkPreview, provided by the LinkPreviewPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) → bool
The equality operator.
inherited