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
69 stars 66 forks source link

Link Preview is breaking for the link "https://www.suppdock.com/" #62

Closed sumittiware closed 3 months ago

sumittiware commented 8 months ago

AnyLink preview is breaking for the link https://www.suppdock.com/ in the following function of the AnyLink Preview

ImageProvider? _buildImageProvider(String? image) { ImageProvider? imageProvider = image != null ? NetworkImage(image) : null; if (image != null && image.startsWith('data:image')) { imageProvider = MemoryImage( base64Decode(image.substring(image.indexOf('base64') + 7)), ); } return imageProvider; }

this is giving the format exception with following stacktrace

Screenshot 2023-11-06 at 5 28 09 PM

the value of image variable was : data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20%20%22%3E%3C/svg%3E

sur950 commented 3 months ago

Hi, This will be fixed in V 3.0.2

This is breaking because of the SVG image for which the support is not added, Just FYI the link provided is giving a invalid SVG image.

sur950 commented 3 months ago

any_link_preview: ^3.0.2 is Live now.

Feel free to open this ticket if the issue persists. Thank you!