RichTextSpan constructor

const RichTextSpan({
  1. Key? key,
  2. String text = '',
  3. double fontSize = 13,
  4. Color fontColor = const Color(0xe6333333),
  5. FontWeight fontWeight = FontWeight.normal,
  6. String ellipsis = "",
  7. int maxLines = 4,
  8. double lineHeight = 1.2,
  9. double letterSpacing = 0.5,
  10. double lineSpacing = 2,
  11. double emojiSize = 20.0,
  12. Color atFontColor = Colors.blue,
  13. double atFontSize = 16.0,
  14. Color linkFontColor = Colors.blue,
  15. double linkFontSize = 16.0,
  16. Map<String, dynamic>? extrasMap,
  17. OnTagCall? onTagCall,
  18. TagArguments? startTagItems,
  19. String? moreText,
  20. Color moreTextColor = Colors.blue,
  21. OnMoreTagCall? onMoreTagCall,
  22. TextStyle? colorTagStyle,
  23. bool isMarkPinyin = false,
  24. Map<String, dynamic> wordsPinyinMap = const {},
  25. dynamic buildCall(
    1. RichTextSpanModel model
    )?,
  26. dynamic pinYinParsingCall()?,
  27. bool enablePinYinCheck = false,
  28. Color markTextColor = const Color(0xe6333333),
  29. double markTextSize = 12,
  30. List<Map<List<int>, TextSpanStyle>> indexRangeStyle = const [],
  31. TextAlign? textAlign,
  32. Iterable<int>? customWordIndex,
  33. OnCustomWordCall? customWordCall,
  34. bool selectionEnabled = false,
  35. Color? selectionToolBarColor = const Color(0xcc3B372C),
  36. List<TextSelectionToolbarItemData>? selectionToolBarItems,
  37. double? selectionToolBarHeight,
  38. List<String>? referenceMarkList,
  39. OnReferenceWordCall? referenceWordCall,
})

Implementation

const RichTextSpan({
  Key? key,
  this.text = '',
  this.fontSize = 13,
  this.fontColor = const Color(0xe6333333),
  this.fontWeight = FontWeight.normal,
  this.ellipsis = "",
  this.maxLines = 4,
  this.lineHeight = 1.2,
  this.letterSpacing = 0.5,
  this.lineSpacing = 2,
  this.emojiSize = 20.0,
  this.atFontColor = Colors.blue,
  this.atFontSize = 16.0,
  this.linkFontColor = Colors.blue,
  this.linkFontSize = 16.0,
  this.extrasMap,
  this.onTagCall,
  this.startTagItems,
  this.moreText,
  this.moreTextColor = Colors.blue,
  this.onMoreTagCall,
  this.colorTagStyle,
  this.isMarkPinyin = false,
  this.wordsPinyinMap = const {},
  this.buildCall,
  this.pinYinParsingCall,
  this.enablePinYinCheck = false,
  this.markTextColor = const Color(0xe6333333),
  this.markTextSize = 12,
  this.indexRangeStyle = const [],
  this.textAlign,
  this.customWordIndex,
  this.customWordCall,
  this.selectionEnabled = false,
  this.selectionToolBarColor = const Color(0xcc3B372C),
  this.selectionToolBarItems,
  this.selectionToolBarHeight,
  this.referenceMarkList,
  this.referenceWordCall,
}) : super(key: key);