andyduke / styled_text_package

Text widget with formatted text using tags. Makes it easier to use formatted text in multilingual applications.
https://pub.dev/packages/styled_text
BSD 3-Clause "New" or "Revised" License
75 stars 48 forks source link

Need to set hyper link for email and phone number #21

Closed Brinfotech1407 closed 3 years ago

Brinfotech1407 commented 3 years ago

For bold italic it is working fine i need to display the email with hyperlink and same as moblie number

andyduke commented 3 years ago

Perhaps this is what you want: https://github.com/andyduke/styled_text_package/blob/c7acd7e9660671ffffc4000768acb5c9bbc72330/example/lib/main.dart#L146-L155

Brinfotech1407 commented 3 years ago

I am working on chat app where user will enter email or phone no or url as a message so in that case i think i need to manually append this tag ?

andyduke commented 3 years ago

@Brinfotech1407 Do you want to automatically convert a URL, email, or phone number in text into an tappable link?

Brinfotech1407 commented 3 years ago

Yes exactly

On Sat, 30 Jan 2021, 19:52 Andy Chentsov, notifications@github.com wrote:

@Brinfotech1407 https://github.com/Brinfotech1407 Do you want to automatically convert a URL, email, or phone number in text into an tappable link?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andyduke/styled_text_package/issues/21#issuecomment-770219672, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZMSVDR6FYUCMFGHGLVMB3S4QIYTANCNFSM4W2FYZOQ .

andyduke commented 3 years ago

In this case, you need to use another package (for example Cretezy/linkify) to recognize URLs, e-mails and phone numbers and then convert them to text with xml tags, which can be used in StyledText. Or use a package that does it all at once, for example Cretezy/flutter_linkify.