text_highlight_codespark 2.1.0
text_highlight_codespark: ^2.1.0 copied to clipboard
Flutter widget for highlighting rich text — single query, multiple queries with per-term colors, regex patterns, tappable spans, and rounded-corner styling.
Changelog #
All notable changes to this project will be documented in this file.
2.1.0 - 2026-06-10 #
Added #
- Comprehensive
///dartdoc comments on all public classes, constructors, and fields — visible on hover in VS Code and rendered on pub.dev. repositoryandissue_trackerfields inpubspec.yamlfor better pub.dev discoverability.topicsfield (text,search,ui,widget,regex) for pub.dev topic search.- Platform declarations (
android,ios,linux,macos,web,windows) for full platform support scoring. - Overhauled
README.mdwith author attribution, pub.dev badges, comprehensive code examples for all modes, and an API reference table. - Updated example app showcasing all eight usage scenarios with a sectioned
ListView.
2.0.0 - 2026-06-10 #
Breaking Changes #
- Replaced the three-constructor API (
HighlightText,HighlightText.multiple,HighlightText.regex) with a singleHighlightTextwidget that takes aHighlightQueryparameter. caseSensitiveis nowbool(non-nullable, defaults tofalse) instead ofbool?.
Added #
HighlightQuerysealed class with.single,.multiple, and.regexconstructors — clean, type-safe, no unused fields.- Per-query colors in
.multiplemode viaMap<String, Color>? colorsonHighlightQuery.multiple. onTapcallback — fires with the matched string when a highlighted span is tapped.borderRadius— renders highlighted spans with rounded corners using aWidgetSpan+Container.textAlign,maxLines,overflow,softWrap— passed through to the underlyingText.rich.- Proper disposal of
TapGestureRecognizerinstances viaStatefulWidget.
Fixed #
matchedTextStylewas silently ignored in.regexmode — now correctly applied.- Queries in
.multiplemode are now regex-escaped, preventing crashes on inputs like"c++"or"(text)".
1.0.1 - 2024-06-25 #
Fixed #
- Updated homepage URL to GitHub repository.
- Documentation: Included comprehensive examples, comments and usage instructions in the
README.mdfile.
1.0.0 - 2024-06-25 #
Added #
- Initial release of
HighlightTextpackage. - Feature to highlight single query within the source text.
- Support for case-sensitive search for single query.
- Support for custom text styles for matched and unmatched text.
- Multiple queries highlighting with the
HighlightText.multipleconstructor. - Regex highlighting with the
HighlightText.regexconstructor. caseSensitiveparameter for both single and multiple queries.- Examples and usage instructions in the
README.md.
