SubstringHighlight constructor
const
SubstringHighlight({
- Key? key,
- bool caseSensitive = false,
- int? maxLines,
- TextOverflow overflow = TextOverflow.clip,
- String? term,
- List<
String> ? terms, - required String text,
- TextAlign textAlign = TextAlign.left,
- TextStyle textStyle = const TextStyle(color: Colors.black),
- TextStyle textStyleHighlight = const TextStyle(color: Colors.red),
- String wordDelimiters = ' .,;?!<>[]~`@#\$%^&*()+-=|/_',
- bool words = false,
Creates a SubstringHighlight widget.
The text parameter is required and represents the text to be displayed.
Either term or terms must be provided for highlighting.
Implementation
const SubstringHighlight({
Key? key,
this.caseSensitive = false,
this.maxLines,
this.overflow = TextOverflow.clip,
this.term,
this.terms,
required this.text,
this.textAlign = TextAlign.left,
this.textStyle = const TextStyle(
color: Colors.black,
),
this.textStyleHighlight = const TextStyle(
color: Colors.red,
),
this.wordDelimiters = ' .,;?!<>[]~`@#\$%^&*()+-=|/_',
this.words = false,
}) : assert(term != null || terms != null),
super(key: key);