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.
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.
- otp_autofill
Android and iOS OTP autofill plugin using SMS User Consent and Retriever APIs.
50Compare - mention_tag_text_field
Adds mention and tagging capabilities to TextField or TextFormField widgets in Flutter.
48Compare - flutter_masked_text2
Masked and money text input controllers for Flutter text fields.
50Compare
Works with
Packages commonly used together with flutter_mentions: ones it builds on, ones built on it, and its own family.