highlightable 1.0.0 copy "highlightable: ^1.0.0" to clipboard
highlightable: ^1.0.0 copied to clipboard

outdated

A text widget that makes easy to highlight any letter/word you want


Package Logo

License: MIT License: MIT CONTRIBUTING

Overview & Usage #

First, actualText property and highlightableWord property are required. You can customize actualText by providing defaultStyle. Also you can customize highlighted text style by highlightStyle property. highlightableWord poperty should be "Text splited array". E.g - "hi".split("") it will return an array like: ["h", "i"]. Otherwise, it could be a string, the widget automatically will convert it to array.

Very basic usage #

HighlightText(
  'Hello World',
  highlightableWord: 'hello',
),
s1

Custom usage #

HighlightText(
   'Hello Flutter',
   highlightableWord: 'hello',
   defaultStyle: TextStyle(
      fontSize: 25,
      color: Colors.black,
   ),
   highlightStyle: TextStyle(
      fontSize: 25,
      letterSpacing: 2.5,
      color: Colors.white,
      backgroundColor: Colors.blue,
   ),
),
stwo
17
likes
0
points
1.31k
downloads

Publisher

verified publishertheiskaa.com

Weekly Downloads

A text widget that makes easy to highlight any letter/word you want

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on highlightable