ReadMoreTxt.rich constructor

const ReadMoreTxt.rich(
  1. TextSpan? richData, {
  2. Key? key,
  3. TextSpan? richPreData,
  4. TextSpan? richPostData,
  5. ValueNotifier<bool>? isCollapsed,
  6. String trimExpandedText = 'show less',
  7. String trimCollapsedText = 'read more',
  8. Color? colorClickableText,
  9. int trimLength = 240,
  10. int trimLines = 2,
  11. TrimMode trimMode = TrimMode.length,
  12. TextStyle? moreStyle,
  13. TextStyle? lessStyle,
  14. String delimiter = '$_kEllipsis ',
  15. TextStyle? delimiterStyle,
  16. bool isExpandable = true,
  17. TextStyle? style,
  18. StrutStyle? strutStyle,
  19. TextAlign? textAlign,
  20. TextDirection? textDirection,
  21. Locale? locale,
  22. bool? softWrap,
  23. TextOverflow? overflow,
  24. TextScaler? textScaler,
  25. String? semanticsLabel,
  26. TextWidthBasis? textWidthBasis,
  27. TextHeightBehavior? textHeightBehavior,
  28. Color? selectionColor,
  29. Widget? customCollapsedWidget,
  30. Widget? customExpandedWidget,
})

Implementation

const ReadMoreTxt.rich(
    this.richData, {
      super.key,
      this.richPreData,
      this.richPostData,
      this.isCollapsed,
      this.trimExpandedText = 'show less',
      this.trimCollapsedText = 'read more',
      this.colorClickableText,
      this.trimLength = 240,
      this.trimLines = 2,
      this.trimMode = TrimMode.length,
      this.moreStyle,
      this.lessStyle,
      this.delimiter = '$_kEllipsis ',
      this.delimiterStyle,
      this.isExpandable = true,
      this.style,
      this.strutStyle,
      this.textAlign,
      this.textDirection,
      this.locale,
      this.softWrap,
      this.overflow,
      this.textScaler,
      this.semanticsLabel,
      this.textWidthBasis,
      this.textHeightBehavior,
      this.selectionColor,

      /// NEW — custom widgets
      this.customCollapsedWidget,
      this.customExpandedWidget,
    })  : data = null,
      annotations = null,
      preDataText = null,
      postDataText = null,
      preDataTextStyle = null,
      postDataTextStyle = null;