Skip to content
pubscout

mention_tag_text_field

0.0.9, released a year ago by an unverified publisher

Adds mention and tagging capabilities to TextField or TextFormField widgets in Flutter.

WASM-ready
$ flutter pub add mention_tag_text_field
Source repository

What it does

Extends standard text fields to support user mentions and tags using custom trigger symbols like '@' or '#'. It provides a custom controller to track mentions, retrieve data associated with tags, and handle custom styling or removal of mentions.

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

Use it when

  • You need to implement social media-style tagging or mentioning in a text input field.
  • You want to associate structured data (like user objects) with specific text mentions.

Skip it when

  • You need complex rich-text editing beyond basic mentions and tags.
  • You are not using standard TextField or TextFormField widgets.

Strengths

  • Supports multiple mention symbols and custom styling per mention.
  • Handles automatic backspace removal and incremental mention deletion.
  • Provides initial mention support and easy access to mention data and text.

Weaknesses

  • Limited to mention and tagging use cases on top of existing text fields.
  • Requires manual removal through the controller rather than direct list manipulation.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
final MentionTagTextEditingController _controller = MentionTagTextEditingController();

MentionTagTextField(
  controller: _controller,
  onMention: (value) async {
    // Handle mention search results
  },
  mentionTagDecoration: MentionTagDecoration(
    mentionStart: ['@', '#'],
  ),
)

Alternatives

Packages that do the same job and could replace mention_tag_text_field.