BText.rich constructor

const BText.rich({
  1. Key? key,
  2. bool useStyleFirst = true,
  3. String? text = '',
  4. List<String> texts = const [],
  5. TextStyle? style,
  6. List<TextStyle> styles = const [],
  7. GestureRecognizer? recognizer,
  8. List<GestureRecognizer?> recognizers = const [],
  9. String? semanticsLabel,
  10. List<String> semanticsLabels = const [],
  11. MouseCursor? mouseCursor,
  12. List<MouseCursor?> mouseCursors = const [],
  13. PointerEnterEventListener? onEnter,
  14. List<PointerEnterEventListener?> onEnters = const [],
  15. PointerExitEventListener? onExit,
  16. List<PointerExitEventListener?> onExits = const [],
  17. Locale? locale,
  18. List<Locale?> locales = const [],
  19. bool? spellOut,
  20. List<bool?> spellOuts = const [],
  21. StrutStyle? strutStyle,
  22. TextAlign? textAlign,
  23. TextDirection? textDirection,
  24. bool? softWrap,
  25. TextOverflow? overflow,
  26. double? textScaleFactor,
  27. int? maxLines,
  28. TextWidthBasis? textWidthBasis,
  29. TextHeightBehavior? textHeightBehavior,
  30. Color? selectionColor,
  31. TextScaler? textScaler = TextScaler.noScaling,
  32. bool inherit = true,
  33. Color? color,
  34. Color? backgroundColor,
  35. String? fontFamily,
  36. List<String>? fontFamilyFallback,
  37. String? package,
  38. double? fontSize,
  39. FontWeight? fontWeight,
  40. FontStyle? fontStyle,
  41. double? letterSpacing,
  42. double? wordSpacing,
  43. TextBaseline? textBaseline,
  44. double? height,
  45. Paint? foreground,
  46. Paint? background,
  47. TextDecoration decoration = TextDecoration.none,
  48. Color? decorationColor,
  49. TextDecorationStyle? decorationStyle,
  50. double? decorationThickness,
  51. String? debugLabel,
  52. List<Shadow>? shadows,
  53. List<FontFeature>? fontFeatures,
  54. TextLeadingDistribution? leadingDistribution,
  55. List<FontVariation>? fontVariations,
})

RText 一致,仅增加 主题适配 textstylerecognizersemanticsLabelmouseCursoronEnteronExitlocalespellOut 这几个如果有值默认应用于 0

Implementation

const BText.rich({
  super.key,
  this.useStyleFirst = true,

  /// [TextSpan]
  this.text = '',
  this.texts = const [],
  this.style,
  this.styles = const [],
  this.recognizer,
  this.recognizers = const [],
  this.semanticsLabel,
  this.semanticsLabels = const [],
  this.mouseCursor,
  this.mouseCursors = const [],
  this.onEnter,
  this.onEnters = const [],
  this.onExit,
  this.onExits = const [],
  this.locale,
  this.locales = const [],
  this.spellOut,
  this.spellOuts = const [],

  /// [Text]
  this.strutStyle,
  this.textAlign,
  this.textDirection,
  this.softWrap,
  this.overflow,
  this.textScaleFactor,
  this.maxLines,
  this.textWidthBasis,
  this.textHeightBehavior,
  this.selectionColor,
  this.textScaler = TextScaler.noScaling,

  /// [TextStyle]
  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.leadingDistribution,
  this.fontVariations,
});