Did you know?

You can show native-looking URL links on Flutter web using TextSpan:

  • Create a Text.rich or SelectableText.rich widget
  • Make it look like a web link with a custom text style
  • Add a gesture recognizer to open the web link
  • Customize the mouse cursor style
Showing URLs on Flutter web with TextSpan

As an alternative, wrap the whole thing with a Link widget (from the url_launcher package):

Alternative with Link widget (url_launcher)

Here’s a complete URLTextWidget that implements the whole thing, in 40 lines of code:

Happy coding!