flutter_link_previewer
flutter_link_previewer copied to clipboard
Customizable link and URL preview extracted from the provided text with the ability to render from the cache. Ideal for chat applications.
The following code is placed on my `StatefulWidget`. ```dart LinkPreview( enableAnimation: true, onPreviewDataFetched: (data) { print(data); // data is empty setState(() { httpdata = data; }); }, previewData: httpdata, text:...
/// Regex to find all links in the text. const regexLink = r'((http|ftp|https):\/\/)?([\w_-]+(?:(?:\.[\w_-]*[a-zA-Z_][\w_-]*)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?[^\.\s]'; /// Regex to find all links in the text. const regexLink = r'https?://(?:[А-Яа-яA-Za-z0-9-]+\.)+[А-Яа-яA-Za-z]{2,}(?:/[^/#?]+)+\.(?:[A-Za-z0-9]+(?:\.[A-Za-z0-9]+)*)?(?:\?[^#\s]*)?(?:#\S*)?'
There's some issue that the data from LinkPreview can not fetch image from link like ChatGPT or TikTok, but works well some common link like Google, YouTube, Drive, StackOverFlow, etc...
I'm using this package inside of a chat screen when I send a link it fetches the image of the previously sent link .
- [x] updated latest version build flutter 3.10 - [x] update lint_rule - [x] add screenshot - [x] bum version
fix download image link get empty info bug and fix image download twice bug