text_chunk_styling 2.0.2 copy "text_chunk_styling: ^2.0.2" to clipboard
text_chunk_styling: ^2.0.2 copied to clipboard

Flutter package which allows to style specific parts of a String.

text_chunk_styling #

Pub Version Issues License

Flutter package which allows to style specific parts of a String.

Getting Started #

Add text_chunk_styling to your pubspec.yaml :

    text_chunk_styling: any

Code Sample #

Flutter Code #

TextChunkStyling(
    text:
        'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus erat purus, sollicitudin et velit sed, suscipit euismod ipsum. Etiam ultricies purus a nunc condimentum, sollicitudin mollis tortor maximus. Phasellus fringilla augue a leo molestie feugiat. Donec eget nisi vel metus rhoncus ultricies. Donec non semper mi. Suspendisse dictum orci molestie libero vehicula, ut faucibus massa luctus. Etiam sit amet urna tristique, ullamcorper ex at, feugiat ipsum. Mauris ut leo quis magna tempus euismod. Nam euismod mauris quam, quis iaculis ligula ornare quis. Nunc egestas urna ac mauris consequat, id tincidunt justo iaculis. Ut posuere risus elit, vel facilisis nulla lobortis non.',
    highlightText: ['sum', 'ing', 'mod', 'ris', 'nam'],
    multiTextStyles: [
        TextStyle(color: Colors.red, fontWeight: FontWeight.bold),
        TextStyle(color: Colors.amber, fontWeight: FontWeight.bold),
        TextStyle(color: Colors.blue, fontWeight: FontWeight.bold),
        TextStyle(color: Colors.brown, fontWeight: FontWeight.bold),
        TextStyle(color: Colors.cyan, fontWeight: FontWeight.bold),
    ],
);

Result #

Screenshot

Find the full example in example/

2
likes
150
pub points
19%
popularity

Publisher

verified publisherrouxguillau.me

Flutter package which allows to style specific parts of a String.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on text_chunk_styling