ExpandableText constructor

const ExpandableText(
  1. String text, {
  2. Key? key,
  3. required String expandText,
  4. String? collapseText,
  5. bool expanded = false,
  6. ExpandableTextController? controller,
  7. ValueChanged<bool>? onExpandedChanged,
  8. VoidCallback? onLinkTap,
  9. Color? linkColor,
  10. bool linkEllipsis = true,
  11. TextStyle? linkStyle,
  12. String? prefixText,
  13. TextStyle? prefixStyle,
  14. VoidCallback? onPrefixTap,
  15. TextStyle? urlStyle,
  16. StringCallback? onUrlTap,
  17. TextStyle? hashtagStyle,
  18. StringCallback? onHashtagTap,
  19. TextStyle? mentionStyle,
  20. StringCallback? onMentionTap,
  21. bool expandOnTextTap = false,
  22. bool collapseOnTextTap = false,
  23. TextStyle? style,
  24. TextDirection? textDirection,
  25. TextAlign? textAlign,
  26. double? textScaleFactor,
  27. int maxLines = 2,
  28. bool animation = false,
  29. Duration? animationDuration,
  30. Curve? animationCurve,
  31. String? semanticsLabel,
})

Implementation

const ExpandableText(
  this.text, {
  Key? key,
  required this.expandText,
  this.collapseText,
  this.expanded = false,
  this.controller,
  this.onExpandedChanged,
  this.onLinkTap,
  this.linkColor,
  this.linkEllipsis = true,
  this.linkStyle,
  this.prefixText,
  this.prefixStyle,
  this.onPrefixTap,
  this.urlStyle,
  this.onUrlTap,
  this.hashtagStyle,
  this.onHashtagTap,
  this.mentionStyle,
  this.onMentionTap,
  this.expandOnTextTap = false,
  this.collapseOnTextTap = false,
  this.style,
  this.textDirection,
  this.textAlign,
  this.textScaleFactor,
  this.maxLines = 2,
  this.animation = false,
  this.animationDuration,
  this.animationCurve,
  this.semanticsLabel,
})  : assert(maxLines > 0),
      super(key: key);