text_word_highlighter 0.0.3 copy "text_word_highlighter: ^0.0.3" to clipboard
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 #

  1. Highlight multiple words inside a sentence.
  2. Provide style for particular word
  3. Highlight words based on index
  4. 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...

7
likes
150
points
10
downloads

Publisher

verified publisherandroidshashi.com

Weekly Downloads

A flutter package that highlight multiple words inside a text sentence.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on text_word_highlighter