ReadMoreTxt.rich constructor
const
ReadMoreTxt.rich(
- TextSpan? richData, {
- Key? key,
- TextSpan? richPreData,
- TextSpan? richPostData,
- ValueNotifier<
bool> ? isCollapsed, - String trimExpandedText = 'show less',
- String trimCollapsedText = 'read more',
- Color? colorClickableText,
- int trimLength = 240,
- int trimLines = 2,
- TrimMode trimMode = TrimMode.length,
- TextStyle? moreStyle,
- TextStyle? lessStyle,
- String delimiter = '$_kEllipsis ',
- TextStyle? delimiterStyle,
- bool isExpandable = true,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- TextScaler? textScaler,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
- Color? selectionColor,
- Widget? customCollapsedWidget,
- 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;