CustomLinkPreview class final
A utility class that provides methods to fetch the title, description, and image of a given URL.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getLinkPreviewData(
String url) → Future< CustomLinkPreviewData?> -
This method is used to get the link preview data
Returns the
CustomLinkPreviewData
object containing the title, description, and image of the given URL. If the URL is invalid or the data cannot be fetched, returnsnull
. Throws an exception if the response status code is not 200.