BText.rich constructor
const
BText.rich({
- Key? key,
- bool useStyleFirst = true,
- String? text = '',
- List<
String> texts = const [], - TextStyle? style,
- List<
TextStyle> styles = const [], - GestureRecognizer? recognizer,
- List<
GestureRecognizer?> recognizers = const [], - String? semanticsLabel,
- List<
String> semanticsLabels = const [], - MouseCursor? mouseCursor,
- List<
MouseCursor?> mouseCursors = const [], - PointerEnterEventListener? onEnter,
- List<
PointerEnterEventListener?> onEnters = const [], - PointerExitEventListener? onExit,
- List<
PointerExitEventListener?> onExits = const [], - Locale? locale,
- List<
Locale?> locales = const [], - bool? spellOut,
- List<
bool?> spellOuts = const [], - StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- bool? softWrap,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
- Color? selectionColor,
- TextScaler? textScaler = TextScaler.noScaling,
- bool inherit = true,
- Color? color,
- Color? backgroundColor,
- String? fontFamily,
- List<
String> ? fontFamilyFallback, - String? package,
- double? fontSize,
- FontWeight? fontWeight,
- FontStyle? fontStyle,
- double? letterSpacing,
- double? wordSpacing,
- TextBaseline? textBaseline,
- double? height,
- Paint? foreground,
- Paint? background,
- TextDecoration decoration = TextDecoration.none,
- Color? decorationColor,
- TextDecorationStyle? decorationStyle,
- double? decorationThickness,
- String? debugLabel,
- List<
Shadow> ? shadows, - List<
FontFeature> ? fontFeatures, - TextLeadingDistribution? leadingDistribution,
- List<
FontVariation> ? fontVariations,
与 RText 一致,仅增加 主题适配
text
、style
、recognizer
、semanticsLabel
、mouseCursor
、onEnter
、onExit
、locale
、spellOut
这几个如果有值默认应用于 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,
});