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
77 stars 76 forks source link

can't parse link for Flutter web #59

Closed Ashik55 closed 7 months ago

Ashik55 commented 1 year ago

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

toco1001 commented 1 year ago

Same here.

sudhanshun45 commented 1 year ago

any solutions for flutter web

dennislbc commented 11 months ago

Still a massive isssue for me

vinayrajput05 commented 10 months ago

same here

dennislbc commented 9 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 7 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 4 months 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.