Skip to main content
1

🖱️ Hyperlink Conversion

Converts specific words within the text into clickable hyperlinks. It works by rebuilding the Text widget using Text.rich and wrapping the target words in a TapGestureRecognizer.
// Links 'link' in a purple, bold, and underlined style.
const Text('This is a link to the page.')
    .addHyperLinks(
        hyperLinkTexts: ['link'],
        hyperLinkColor: Colors.purple,
        makeBold: true,
        onHyperlinkClicked: (word) => print('Tapped: $word'));