addLink method

void addLink(
  1. String text,
  2. Link link
)

Implementation

void addLink(String text, Link link) {
  textSpans.add(TextSpan(
    text: text,
    style: TextStyle(
      fontSize: textStyle.fontSize,
      color: Colors.blue,
    ),
    recognizer: TapGestureRecognizer()
      ..onTap = () {
        _launchUrl(link.uri);
      },
  ));
}