TextViewer.textValue constructor

TextViewer.textValue(
  1. String textContent, {
  2. TextStyle textStyle = const TextStyle(),
  3. TextStyle? highLightTextStyle,
  4. TextStyle? focusTextStyle,
  5. Color highLightColor = Colors.yellow,
  6. Color focusColor = Colors.amber,
  7. bool ignoreCase = true,
  8. OnErrorCallback? onErrorCallback,
})

Implementation

factory TextViewer.textValue(
  String textContent, {
  TextStyle textStyle = const TextStyle(),
  TextStyle? highLightTextStyle,
  TextStyle? focusTextStyle,
  Color highLightColor = Colors.yellow,
  Color focusColor = Colors.amber,
  bool ignoreCase = true,
  OnErrorCallback? onErrorCallback,
}) {
  return TextViewer._(
      textContent: textContent,
      textStyle: textStyle,
      highLightTextStyle: highLightTextStyle ??
          textStyle.copyWith(background: Paint()..color = highLightColor),
      focusTextStyle: focusTextStyle ??
          textStyle.copyWith(background: Paint()..color = focusColor),
      highLightColor: highLightColor,
      focusColor: focusColor,
      ignoreCase: ignoreCase,
      onErrorCallback: onErrorCallback);
}