text_word_highlighter 0.0.3 text_word_highlighter: ^0.0.3 copied to clipboard
A flutter package that highlight multiple words inside a text sentence.
text_word_highlighter #
text_word_highlighter provides a widget TextWordHighlighter a widget helps you highlight(using text style property) one or many word inside a sentence.
Features #
- Highlight multiple words inside a sentence.
- Provide style for particular word
- Highlight words based on index
- Highlight words based on word(Will be added)
Usage #
Get the example /example
folder.
TextWordHighlighter(
text: 'He Flutter Developers. This is a word highlighter package.',
textStyle: const TextStyle(color: Colors.teal),
wordHighlightList: [
WordHighlight(
wordIndex: 2,
wordStyle: const TextStyle(
color: Colors.red, )),
WordHighlight(
wordIndex: 5,
wordStyle: const TextStyle(
color: Colors.green, )),
WordHighlight(
wordIndex: 6,
wordStyle: const TextStyle(
color: Colors.blue, )),
WordHighlight(
wordIndex: 8,
wordStyle: const TextStyle(
color: Colors.orange, )),
],
)
###Additional information
Attributes | Desscription |
---|---|
TextWordHighlighter | A widget that takes a sentence(basically a string) and a list of indexes and highlights them. |
text | A simple sentence in the form of string. |
textStyle | TextStyle property of text for all the words inside text(sentence). |
highlighterList | List of WordHighlight(A WordHighlight takes index of the word to be highlighted in the sentence, and the style for the word.). |
Coming soon #
More features coming soon...