Skip to content
pubscout

flutter_mentions

2.0.1, released 5 years ago by an unverified publisher

A simple flutter input widget to add @ mentions functionality to your app.

WASM-readyQuiet but busy
$ flutter pub add flutter_mentions
Source repository

What it does

Provides a text input widget that detects trigger characters like '@' or '#' and displays a suggestion overlay list for mentions. Generates markup text from selected mentions.

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

Use it when

  • You need to add user tagging or hashtag functionality inside a text field
  • You want custom suggestion lists tied to specific trigger characters

Skip it when

  • You do not need any form of mentions or trigger-based autocompletion
  • You are not willing to wrap your application in a Portal widget

Strengths

  • Supports multiple mention triggers with custom data and styling
  • Allows custom suggestion builders and markup generation
  • Includes features like search change callbacks and default text population

Weaknesses

  • Requires wrapping the top-level widget with a Portal widget
  • Limited documentation on advanced edge cases beyond basic usage

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Must wrap the top-most widget (e.g., above MaterialApp) with a Portal widget from flutter_portal.

FlutterMentions(
  suggestionPosition: SuggestionPosition.Top,
  maxLines: 5,
  minLines: 1,
  mentions: [
    Mention(
      trigger: '@',
      style: TextStyle(color: Colors.purple),
      data: [
        {
          'id': '61as61fsa',
          'display': 'fayeedP',
        },
      ],
    )
  ],
)

Alternatives

Packages that do the same job and could replace flutter_mentions.

Works with

Packages commonly used together with flutter_mentions: ones it builds on, ones built on it, and its own family.