any_link_preview
Dart package that helps with preview of any links. Fully customizable and has the ability to render from cached data. Useful for apps where we had chat feature.
3.0.3
33K downloads/mo
#135 most downloaded on pub.dev
sur950/any_link_preview
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 10 months
Nearly every release is documented
notes for 21 of 21 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
23 releases · first in 2020
0 releases in the last 12 months
see the full history below
Release timeline
23 releases · Aug 2020 to Jan 2025Releases
latest 23-
3.0.318 Jan 2025Release notes
Open source →-
🛠 Improved Error Handling:
The parser loop now gracefully continues on errors instead of breaking. -
🌐 Custom User-Agent Support:
Pass a customUserAgentas props to tailor link previews to your needs. -
📺 New Helpers:
Added YouTube video and redirection helpers for smoother handling of specific links. -
🚀 Enhanced Metadata Fetching:
ThegetMetadata()function now supports auserAgentoption for more flexible metadata retrieval.
-
-
3.0.210 Apr 2024Release notes
Open source →New Features:
- SVG Icon Support: AnyLinkPreview now seamlessly handles SVG images returned in metadata, enhancing support for various image formats.
- New Metadata Property -
siteName: We've introduced asiteNameproperty to our metadata fetch method, allowing for richer data extraction and display.
Improvements:
- Enhanced
itemBuilderCallback: TheitemBuilderproperty has been expanded to return anSvgPicturewidget when metadata includes an SVG image. This ensures correct rendering of SVGs alongside standard image formats. - Comprehensive Error Handling: When both title and description are missing from the metadata, AnyLinkPreview will now resort to displaying the
errorWidget(if provided) or a default error view. This update ensures a smoother user experience by providing informative feedback in cases of incomplete metadata. - Extended Redirect Support: To improve handling of server-driven redirects, AnyLinkPreview now supports up to 7 redirects, accommodating common status codes
301, 302, 303, 307, 308. This enhancement ensures more reliable URL preview generation across a wider range of web links.
-
3.0.105 Jun 2023 -
3.0.030 Dec 2022Release notes
Open source →- User Agent causing the redirection URLs, Server side rendered meta-tag URLs fail from getting results. Now, we are taking User Agent from server if available, As a fallback we are using client side static User Agent.
- If the link starts with
www.we are removing the same before fetching the results. However, we suggest to check for link validity with the helper method provided before fetching results from the library.
-
2.0.928 Jun 2022Release notes
Open source →- Packages upgraded to support latest version of flutter SDK.
- Now one can provide the height of the Preview Card as per their requirement.
- Builder function is added. Thanks to the contributor <a href="https://github.com/LeGoffMael">Maël</a>
-
2.0.811 May 2022Release notes
Open source →- Deprecated methods / functions are removed
- Renamed
uiDirectiontoUIDirectionas per flutterlintspackage suggestions. keyissue in Validation of link is resolved now. Know more about it <a href="https://github.com/sur950/any_link_preview/issues/29">here</a>- Migration to Flutter Embedding & URL Launch customizations were added. Thanks to the conributor <a href="https://github.com/OmarYehiaDev">OmarYehiaDev</a>
-
2.0.715 Apr 2022Release notes
Open source →- Now one can also add custom headers to the preview requests
- For any sort of errors, it shows the
errorWidgetby default.
-
2.0.616 Feb 2022Release notes
Open source →- Renamed
UIDirectiontouiDirection,UIDirectionHorizontaltouiDirectionHorizontalandUIDirectionVerticaltouiDirectionVerticalas per lint suggestions. - Refactored codebase according to the suggestions from official <a href="https://pub.dev/packages/lints">Dart linter </a>package (package:lints)
- Renamed
-
2.0.516 Feb 2022Release notes
Open source →- FIX: <b>Twitter link preview</b>. Twitter uses client-side-rendering (CSR) to generate HTML in the browser
- Viewing the source directly will not show any of the relevant <meta> tags or actual page HTML content, because it is all dynamically generated on the client's browser in React using JavaScript (i.e. CSR: Client-side rendering). In fact, the HTML source will have a stub containing "We've detected that JavaScript is disabled in your browser. Would you like to proceed to legacy Twitter?". This can be verified by opening up developer tools and peeking at the "Elements" tab during page load/render or downloading the page without JavaScript emulation
- However, to improve Search Engine Optimization (SEO) for various prominent web-crawlers, Twitter will instead return server-side-rendered (SSR) HTML content (which does contain the
<meta>tags). This enables crawlers to not have to emulate JavaScript to view the page, and only crawl raw HTML content. Twitter recognizes crawlers based on the supplied User-Agent HTTP Header. Server-side-rendering is generally a more expensive operation than offloading the HTML rendering onto the client, which may be a reason why Twitter opts for client-side-rendering as the default behavior.
- FIX: <b>Twitter link preview</b>. Twitter uses client-side-rendering (CSR) to generate HTML in the browser
-
2.0.428 Jan 2022Release notes
Open source →- Proxy URL added for CORS issue on the web. One can pass empty if they don't get any CORS issue while running on web platform.
- Now one can disable the
onTapaction on the card by passing empty functiononTap: (){} - If you want to build your own UI & need just the meta data (with or without cache), then you can call the method
AnyLinkPreview.getMetadata(link: "https://google.com/")which returns data of typeMetadata - One can check if the URL is valid or not by calling
AnyLinkPreview.isValidLink("https://google.com/")which returns a boolean.trueifValid,falseifInvalid.
-
2.0.325 Jan 2022 -
2.0.208 Jan 2022Release notes
Open source →- 🎉 Web support added
- Now the plugin will work for most of the links (Even for dynamic links)
- Few minor bugs are closed from Github issues
-
2.0.1-rc01 Jul 2021 pre-release -
2.0.0-rc17 May 2021 pre-release -
1.0.830 Mar 2021Release notes
Open source →borderRadiusgiving it zero has some issue which is fixedremoveElevationnew param added
-
1.0.713 Mar 2021 -
1.0.626 Feb 2021 -
1.0.514 Oct 2020 -
1.0.421 Aug 2020 -
1.0.321 Aug 2020 -
1.0.221 Aug 2020 -
1.0.121 Aug 2020 -
1.0.021 Aug 2020