BTextStyle constructor

const BTextStyle({
  1. bool inherit = true,
  2. Color? color,
  3. Color? backgroundColor,
  4. String? fontFamily,
  5. List<String>? fontFamilyFallback,
  6. String? package,
  7. Locale? locale,
  8. double? fontSize,
  9. FontWeight? fontWeight,
  10. FontStyle? fontStyle,
  11. double? letterSpacing,
  12. double? wordSpacing,
  13. TextBaseline? textBaseline,
  14. double? height,
  15. Paint? foreground,
  16. Paint? background,
  17. TextDecoration? decoration = TextDecoration.none,
  18. Color? decorationColor,
  19. TextDecorationStyle? decorationStyle,
  20. double? decorationThickness,
  21. String? debugLabel,
  22. List<Shadow>? shadows,
  23. List<FontFeature>? fontFeatures,
  24. List<FontVariation>? fontVariations,
  25. TextLeadingDistribution? leadingDistribution,
  26. TextOverflow? overflow,
})

Implementation

const BTextStyle(
    {
    /// 默认样式会继承层级最为接近的 DefaultTextStyle,为true 表示继承,false 表示完全重写
    super.inherit = true,

    /// 字体颜色,注意: 如果有特殊的foreground,此值必须是null
    super.color,
    super.backgroundColor,
    super.fontFamily,
    super.fontFamilyFallback,
    super.package,

    /// Locale,当相同的Unicode字符可以根据不同的地区以不同的方式呈现时,用于选择字体
    super.locale,

    /// 字体大小 默认的是 14
    super.fontSize,

    /// 字体的粗细程度 FontWeight.w100 -- FontWeight.w900 . 默认是FontWeight.w400,
    super.fontWeight,

    /// [FontStyle.normal]正常 [FontStyle.italic]斜体
    super.fontStyle,

    /// 单个字母或者汉字的距离,默认是1.0,负数可以拉近距离
    super.letterSpacing,

    /// 单词之间添加的空间间隔,负数可以拉近距离
    super.wordSpacing,

    /// [TextBaseline.ideographic]用来对齐表意文字的水平线
    /// [TextBaseline.alphabetic ]以标准的字母顺序为基线
    super.textBaseline,

    /// 文本的高度 主要用于[TextSpan] 来设置不同的高度
    super.height,

    /// text的前景色,与 [color] 不能同时设置
    super.foreground,

    /// [text]的背景色
    super.background,

    /// [text]的划线
    /// [TextDecoration.none] 没有 默认
    /// [TextDecoration.underline] 下划线
    /// [TextDecoration.overline] 上划线
    /// [TextDecoration.lineThrough] 中间的线(删除线)
    super.decoration = TextDecoration.none,

    /// [decoration]划线的颜色
    super.decorationColor,

    /// [decoration]划线的样式
    /// [TextDecorationStyle.solid]实线
    /// [TextDecorationStyle.double] 画两条线
    /// [TextDecorationStyle.dotted] 点线(一个点一个点的)
    /// [TextDecorationStyle.dashed] 虚线(一个长方形一个长方形的线)
    /// [TextDecorationStyle.wavy] 正玄曲线
    super.decorationStyle,
    super.decorationThickness,

    /// 只在调试的使用
    super.debugLabel,

    /// 将在[text]下方绘制的阴影列表
    super.shadows,
    super.fontFeatures,
    super.fontVariations,
    super.leadingDistribution,
    super.overflow});