tag_highlight_text
1.0.3, released 3 years ago by an unverified publisher
Highlight text by tags with specific styles and tap actions.
What it does
Provides a TagHighlightText widget that parses custom tags within text strings to apply styles, tap actions, or custom widget builders. Supports nested or multiple distinct tag types for rich text formatting.
AI-written summary of version 1.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to highlight specific parts of text using HTML-like tags.
- You want to attach tap actions or custom widgets to specific tagged words in a text block.
Skip it when
- You need standard Markdown or RichText without custom markup tags.
- You require complex multi-language localization formatting engines.
Strengths
- Simple tag-based syntax for text styling and interaction.
- Supports custom widget builders for advanced inline elements.
- Easy setup with standard Flutter TextStyle and callback actions.
Weaknesses
- Relies on custom string parsing instead of standard formats like Markdown.
- Limited documentation beyond basic examples.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
TagHighlightText(
text: 'This is <highlight>Highlight</highlight>',
highlightBuilder: (tagName) {
if (tagName == 'highlight') {
return HighlightData(
style: TextStyle(color: Colors.red),
);
}
return null;
},
)Alternatives
Packages that do the same job and could replace tag_highlight_text.
- shimmer
Paints a moving highlight over skeleton placeholders and call-to-action text.
83Compare - highlight_text
A Flutter widget to highlight specific words in text with custom styles and actions.
50Compare - flutter_markdown_plus
A Markdown renderer widget for Flutter to display rich text from plain text data.
77Compare - re_editor
A lightweight text and code editor widget for Flutter with syntax highlighting and folding.
80Compare