Skip to content
pubscout

selectable_autolink_text

2.6.0, released 4 years ago by miyake.id

Generate inline links that can be selected and tapped in text for Flutter.

WASM-ready
$ flutter pub add selectable_autolink_text
Source repository

What it does

Provides a widget to display text with automatically detected links that users can both tap and select. Supports custom regular expression patterns, custom link styling, shrinking URLs, and handling tap or long-press events.

AI-written summary of version 2.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need selectable text that contains clickable URLs, email addresses, or phone numbers.
  • You want to customize link patterns (e.g., matching hashtags or custom markdown-like link syntax).

Skip it when

  • You only need standard non-selectable text links.
  • You do not need URL autolinking capabilities.

Strengths

  • Supports text selection alongside clickable inline links.
  • Customizable link patterns and regex capabilities.
  • Supports touch interactions like onTap and onLongPress for links.

Weaknesses

  • Not documented for complex rich text formatting beyond standard link attributes and custom regex matchers.
  • Limited to text and link handling use cases.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

not documented

Widget build(BuildContext context) {
  return SelectableAutoLinkText(
    'Basic https://flutter.dev',
    linkStyle: TextStyle(color: Colors.blueAccent),
    onTap: (url) => launchUrl(Uri.parse(url)),
  );
}

Alternatives

Packages that do the same job and could replace selectable_autolink_text.

  • textf

    Drop-in Text and TextEditingController replacements for inline Markdown-like text formatting

  • gpt_markdown

    Powerful Flutter Markdown and LaTeX renderer built for AI streaming outputs.

  • flutter_link_previewer

    Customizable Flutter widget to fetch and render URL link previews.

  • re_editor

    A lightweight text and code editor widget for Flutter with syntax highlighting and folding.