Flutter Keyword Highlighter

Example Image

flutter_keyword_highlighter is a highly customizable Flutter package that enables easy highlighting of specific keywords or phrases within a block of text. Whether you need to emphasize key terms, support search functionality, or enhance readability for educational content, this package provides extensive styling options for individual words or phrases. You can choose to highlight either exact matches or any instances containing the keyword, making it versatile for various use cases.

Features

•	Highlight Keywords: Define words or phrases to emphasize within a text, enhancing visibility and focus.
•	Custom Styles for Each Highlight: Apply unique styles—such as color, font weight, or font size—to each highlighted text.
•	Match Options: Select between exact word matching or partial matching to broaden search and highlight options.
•	Cohesive Text Styling: Specify a default style for the remaining, non-highlighted text to maintain a unified look and feel.
•	Adaptive Text Color: When no default color is specified, the widget automatically adapts to the app’s theme, using black text in light mode and white text in dark mode.

Installation

Add the package to your pubspec.yaml:

dependencies:
  flutter_keyword_highlighter: ^1.1.1 # Check for the latest version on pub.dev