GrepText - Kibibibit/geoff GitHub Wiki
GrepText is a widget that takes in a string of text, and a search term, and then displays that text with the search term highlighted.
For example:
GrepText("Hello world!", searchTerm: "world")
will return: Hello world!
Currently GrepText is case-sensitive, and will highlight all terms. This will be improved in future builds.
API
Constructor
GrepText()
| Field | Type | Default | Value |
|---|---|---|---|
text |
string? |
None | This will be the main body of text for this widget |
searchTerm |
string? |
None | This will be the highlighted text, if present in text |
textStyle |
TextStyle? |
None | This will be the style of the main body of text. Defaults to bodytext2 but with black text |
highlightStyle |
TextStyle? |
None | This will be the style of the highlighted text. Defaults to bodytext2 but with bold red text |
All other parameters are the same as a standard RichText widget