link_preview_generator
1.2.0, released 5 years ago by an unverified publisher
A Flutter widget to convert web links into rich visual previews.
What it does
Scrapes metadata from URLs to render customizable preview cards with titles, descriptions, and images. It also provides a function to extract page metadata manually for custom UI implementations.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to display rich previews of URLs inside chat or feed apps.
- You need customizable cards with image, title, and description generated from a link.
Skip it when
- You need deep scraping of complex JavaScript-heavy web applications.
- You are running on web and encounter CORS restrictions without using a proxy URL.
Strengths
- Provides both a ready-to-use widget and a scraping function for custom UIs.
- Supports customizable styling, caching duration, and fallback error states.
- Cross-platform support across mobile and desktop.
Weaknesses
- May require a proxy URL to resolve CORS issues when used on the web.
- Relies on standard web meta tags, which may fail on sites without proper Open Graph tags.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
LinkPreviewGenerator(
bodyMaxLines: 3,
link: 'https://github.com/ghpranav/link_preview_generator',
linkPreviewStyle: LinkPreviewStyle.large,
showGraphic: true,
)Alternatives
Packages that do the same job and could replace link_preview_generator.
- gpt_markdown
Powerful Flutter Markdown and LaTeX renderer built for AI streaming outputs.
94Compare - flutter_link_previewer
Customizable Flutter widget to fetch and render URL link previews.
91Compare - textf
Drop-in Text and TextEditingController replacements for inline Markdown-like text formatting
81Compare - flutter_markdown_plus
A Markdown renderer widget for Flutter to display rich text from plain text data.
77Compare
Works with
Packages commonly used together with link_preview_generator: ones it builds on, ones built on it, and its own family.
- url_launcherlink_preview_generator depends on itFlutter plugin for launching URLs across mobile, desktop, and web platforms.
- universal_htmllink_preview_generator depends on itCross‑platform replacement for dart:html with DOM parsing, XML support, and EventSource.
- build_runnerUsed togetherA build system for Dart code generation and modular compilation.