Skip to content
pubscout

flutter_link_previewer

4.2.1, released 2 months ago by flyer.chat

Customizable Flutter widget to fetch and render URL link previews.

WASM-readyUses material_uiRock solid
$ flutter pub add flutter_link_previewer
Source repository

What it does

Extracts the first URL from given text, automatically fetches metadata such as title, description, and image, and displays it in a clean animated card. It supports rendering from cache and international domains.

AI-written summary of version 4.2.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building chat applications that need URL preview cards
  • Displaying rich metadata cards for shared links

Skip it when

  • You only need to open links in a browser without preview UI
  • You need complex web-scraping features outside standard link metadata

Strengths

  • Automatic preview generation and smart image layout
  • Supports international domains and custom tap handling
  • Includes cache support to avoid redundant network requests

Weaknesses

  • Limited to rendering previews for the first URL found in text
  • Relies on network requests to fetch metadata from external sites

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
6

not documented

LinkPreview(
  text: widget.message,
  linkPreviewData: _linkPreviewData,
  onLinkPreviewDataFetched: (data) {
    setState(() {
      _linkPreviewData = data;
    });
  },
)

Alternatives

Packages that do the same job and could replace flutter_link_previewer.

Works with

Packages commonly used together with flutter_link_previewer: ones it builds on, ones built on it, and its own family.