Closed mycar98765 closed 1 year ago
Can you show some of your code? It's confusing and bad UX to jump back and forth between SO discussions to understand the issue. I read them and now I'm unsure if the package has a bug or your implementation has one.
Hi @sgbasaraner ok I will share my code
My code:
AnyLinkPreview(
link: message,
),
When the message contains words that are not URLs, no results are returned.
Only returns results if the message is a URL
AFAIK the library doesn't do the URL detection for you. You should iterate over the message, and if you come across a URL, pass that to the library.
@sgbasaraner I don't quite get it. Can you share some code samples?
Thanks for helping the community @sgbasaraner
My code:
AnyLinkPreview( link: message, ),
@mycar98765 This library expects a valid URL in your message
variable. So you will need to identify the URL from your text and pass it on to the library instead of passing everything.
As this is more of an implementation issue, I would suggest asking questions in Stack Overflow forums.
I found a bug in the
any_link_preview
package. I asked a question and got answer in Stack Overflow. This and this comment are about the bug: https://stackoverflow.com/questions/74471700/how-to-make-a-chat-bubble-like-whatsapps-chat-bubble-in-flutter#comment131464378_74471788 https://stackoverflow.com/questions/74471700/how-to-make-a-chat-bubble-like-whatsapps-chat-bubble-in-flutter#comment131464458_74471788Second and fourth pictures:
I really hope this bug can be fixed. If this bug is fixed, this package will really be 100% usable in chat. Thanks in advance!