simple_link_preview 2.1.0 copy "simple_link_preview: ^2.1.0" to clipboard
simple_link_preview: ^2.1.0 copied to clipboard

Lightweight link previews for HTML metadata, direct images, and other web content types.

2.1.0 - 2026-09-14 #

  • Fetch resources as streams and parse only the HTML head.
  • Add normalized contentType and page icon metadata.
  • Add LinkPreview.toJson().
  • Support direct images and other successful MIME types.
  • Improve support for complex URLs and redirects.
  • Return null for invalid URLs and request failures.
  • Replace metadata_fetch_plus and universal_html with html.
  • Add deterministic unit tests for metadata, content types, redirects, and failure handling.
  • Add an optional asynchronous onError handler to SimpleLinkPreview.getPreview().
  • Add public immutable LinkPreviewOptions with timeout, HTML byte limit, and redirect limit configuration.
  • Add LinkPreviewOptions.validateStatus to accept selected HTTP responses, including renderable error pages.
  • Accept Open Graph name attributes as a fallback for property attributes.
  • Skip empty or invalid image and icon candidates before trying fallbacks.
  • Resolve relative metadata URLs against a valid document <base href>.
  • Sniff a bounded prefix for HTML when Content-Type is missing.
  • Apply one timeout deadline across sending, streaming, and parsing.
  • Add structured LinkPreviewException error codes and report verified failures, including HTTP statuses rejected by validateStatus, through onError.

2.0.0 #

  • Upgrade the minimum Dart SDK constraint to >=3.0.0 <4.0.0.

1.0.2 #

  • Format code.

1.0.1 #

  • Update public API documentation.

1.0.0 #

  • Initial version.
14
likes
160
points
296
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Lightweight link previews for HTML metadata, direct images, and other web content types.

Repository (GitHub)
View/report issues

License

AGPL-3.0 (license)

Dependencies

html, http

More

Packages that depend on simple_link_preview