highlightable 1.0.5 icon indicating copy to clipboard operation
highlightable: ^1.0.5 copied to clipboard

A text widget alternative, that highligts defined chars (from pattern / pure-string)


Package Logo

License: MIT License: MIT CONTRIBUTING

Installing #

Usage #

Basic usage: #

HighlightText(
  'Only numbers: [1, 25, 50, ...] will be highlighted',
  // would highlight only numbers.
  highlight: const Highlight(pattern: r'\d'),
)
basic-usage

Custom usage: #

HighlightText(                                   
  "Hello, Flutter!",                             
  // Would highlight only the "Flutter" full word 'cause [detectWords] is enabled.  
  highlight: const Highlight(                          
    words: ["Flutter"],                          
  ),                                             
  caseSensitive: true, // Turn on case-sensitive.
  detectWords: true,  // Turn on full-word-detection.
  style: const TextStyle(                              
    fontSize: 25,                                
    color: Colors.black,                         
    fontWeight: FontWeight.bold,                 
  ),                                             
  highlightStyle: const TextStyle(                     
    fontSize: 25,                                
    letterSpacing: 2.5,                          
    color: Colors.white,                         
    backgroundColor: Colors.blue,                
    fontWeight: FontWeight.bold,                 
  ),                                             
)
custom-usage
7
likes
130
pub points
59%
popularity

Publisher

unverified uploader

A text widget alternative, that highligts defined chars (from pattern / pure-string)

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on highlightable