detectable_text_field
3.0.2, released 3 years ago by bookm.me
TextField and Text widgets with built-in detection for hashtags, mentions, and URLs.
What it does
Provides customized text widgets and controllers that automatically detect and style special patterns like hashtags (#), at-signs (@), and URLs. It helps build Twitter-like applications with live typing detection.
AI-written summary of version 3.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a social media or messaging app that requires hashtag or mention highlighting.
- You need live typing detection for specific patterns inside a text field.
Skip it when
- You only need standard plain text inputs without any custom pattern highlighting.
- You require complex markdown or rich-text editing capabilities beyond pattern detection.
Strengths
- Supports multiple languages including English, Japanese, Korean, Spanish, Arabic, and Thai.
- Provides helper utilities like `isDetected` and `extractDetections`.
- Integrates seamlessly with flutter_hooks via `useDetectableTextEditingController`.
Weaknesses
- Limited to specific detection patterns and text styling rather than full rich text editing.
- Detection rules follow strict platform-specific regex limitations (e.g., stopping at emojis or symbols).
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
not documented
DetectableTextField(
detectionRegExp: detectionRegExp(),
detectedStyle: TextStyle(
fontSize: 20,
color: Colors.blue,
),
)Alternatives
Packages that do the same job and could replace detectable_text_field.
- linkfy_text
A lightweight Flutter widget that detects URLs, emails and hashtags in text and makes them clickable.
50Compare - keyboard_detection
Detect keyboard visibility using bottom view inset in Flutter
56Compare - prompt_dialog
A JavaScript-like prompt dialog widget for Flutter applications.
50Compare - impression
Detects user impression events for Flutter widgets.
45Compare
Works with
Packages commonly used together with detectable_text_field: ones it builds on, ones built on it, and its own family.