> ## Documentation Index
> Fetch the complete documentation index at: https://starrycodes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Text - Widget Extensions

> Easily convert specific words within a Text widget into clickable hyperlinks using TextSpan and TapGestureRecognizer, eliminating manual Text.rich boilerplate.

### 1. 🖱️ Hyperlink Conversion

**addHyperLinks(\{List\<String> hyperLinkTexts, bool showUnderline, bool makeBold, Color? hyperLinkColor, Function(String word)? onHyperlinkClicked})** `Text`

**Parameters**

**hyperLinkTexts** `List\<String\>` (default: REQUIRED)

A list of words (`strings`) that should be converted into clickable `links`.

**onHyperlinkClicked** `Function(String word)?` (default: null)

The `callback` `function` to execute when a linked word is tapped. The tapped `word` is passed as an `argument`.

**showUnderline** `bool` (default: true)

If `true`, adds a text decoration `underline`.

**makeBold** `bool` (default: false)

If `true`, increases the `font weight` of the link.

**hyperLinkColor** `Color?` (default: Colors.blue)

The `color` of the clickable link text.

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`.

```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
// 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'));
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.