BText.rich constructor

const BText.rich({
  1. Key? key,
  2. required List<String> texts,
  3. TextStyle? style,
  4. List<TextStyle> styles = const [],
  5. List<GestureRecognizer?> recognizers = const [],
  6. List<String> semanticsLabels = const [],
  7. StrutStyle? strutStyle,
  8. TextAlign? textAlign,
  9. TextDirection? textDirection,
  10. Locale? locale,
  11. bool? softWrap,
  12. TextOverflow? overflow,
  13. double? textScaleFactor,
  14. int? maxLines,
  15. TextWidthBasis? textWidthBasis,
  16. TextHeightBehavior? textHeightBehavior,
  17. bool inherit = true,
  18. Color? color,
  19. Color? backgroundColor,
  20. String? fontFamily,
  21. List<String>? fontFamilyFallback,
  22. String? package,
  23. double? fontSize,
  24. FontWeight? fontWeight,
  25. FontStyle? fontStyle,
  26. double? letterSpacing,
  27. double? wordSpacing,
  28. TextBaseline? textBaseline,
  29. double? height,
  30. Paint? foreground,
  31. Paint? background,
  32. TextDecoration decoration = TextDecoration.none,
  33. Color? decorationColor,
  34. TextDecorationStyle? decorationStyle,
  35. double? decorationThickness,
  36. String? debugLabel,
  37. List<Shadow>? shadows,
  38. List<FontFeature>? fontFeatures,
  39. Color? selectionColor,
})

RText 一致,仅增加 主题适配

Implementation

const BText.rich({
  super.key,
  required this.texts,
  this.style,
  this.styles = const [],
  this.recognizers = const [],
  this.semanticsLabels = const [],
  this.strutStyle,
  this.textAlign,
  this.textDirection,
  this.locale,
  this.softWrap,
  this.overflow,
  this.textScaleFactor,
  this.maxLines,
  this.textWidthBasis,
  this.textHeightBehavior,
  this.inherit = true,
  this.color,
  this.backgroundColor,
  this.fontFamily,
  this.fontFamilyFallback,
  this.package,
  this.fontSize,
  this.fontWeight,
  this.fontStyle,
  this.letterSpacing,
  this.wordSpacing,
  this.textBaseline,
  this.height,
  this.foreground,
  this.background,
  this.decoration = TextDecoration.none,
  this.decorationColor,
  this.decorationStyle,
  this.decorationThickness,
  this.debugLabel,
  this.shadows,
  this.fontFeatures,
  this.selectionColor,
})  : isRich = true,
      text = '',
      recognizer = null,
      semanticsLabel = null;