BTextStyle constructor
const
BTextStyle({
- bool inherit = true,
- Color? color,
- Color? backgroundColor,
- String? fontFamily,
- List<
String> ? fontFamilyFallback, - String? package,
- Locale? locale,
- 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, - List<
FontVariation> ? fontVariations, - TextLeadingDistribution? leadingDistribution,
- 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});