sur950 / any_link_preview

A flutter Plugin/Package to show the preview of any web link that starts with HTTP/HTTPS. Mostly useful for application that had chat.
MIT License
70 stars 70 forks source link

can't parse link for Flutter web #59

Closed Ashik55 closed 5 months ago

Ashik55 commented 1 year ago

library working fine for flutter mobile apps but not working in flutter web.

toco1001 commented 11 months ago

Same here.

sudhanshun45 commented 10 months ago

any solutions for flutter web

dennislbc commented 8 months ago

Still a massive isssue for me

vinayrajput05 commented 7 months ago

same here

dennislbc commented 6 months ago

ANYONE HAVING THE PROBLEM HERE IS THE SOLUTION.

Preface your web url's with https://corsproxy.org/? then the url.

var webUrl = "https://corsproxy.org/?$url";

Use it in the AnyLinkPreview parameter: link: kIsWeb ? webUrl : url,

Problem solved.

sur950 commented 5 months ago

Hi,

As the documentation mentions, One must send a CORS Proxy URL for AnyLinkPreview to work on the Web.

As @dennislbc rightly shared in the snippet above, This is expected. Thanks for that @dennislbc

sunilguptasg commented 1 month ago

Free CORS proxies eventually stop working - someone needs to pay for the service. Best to host the code as a function of a cloud server of your choice.