Text
具有单一样式的一系列文本。
const Text(
this.data, {
Key key,
this.style,
this.strutStyle, //定义支柱,该支柱设置线相对于基线的最小高度。
this.textAlign,//文本应如何水平对齐。 left right center justify start end
this.textDirection, //文本方向
this.locale,//用于选择区域特定字形的语言环境
this.softWrap,// 将默是否自动换行 false 单行显示 超出屏幕的部分认截断处理
this.overflow, //overflow: TextOverflow.ellipsis 文字超出屏幕之后的处理方式 TextOverflow.clip剪裁
TextOverflow.fade 渐隐 TextOverflow.ellipsis省略号
this.textScaleFactor, //每个逻辑像素的字体像素数。
this.maxLines,// 最大行数
this.semanticsLabel,//此文本的可选语义标签。
this.textWidthBasis,//测量一行或多行文本宽度的不同方法。
this.textHeightBehavior,///定义该段将如何应用[文本样式高度]去攀登第一行和最后一行的下降
}) :
TextStyle
用以绘制文本的不可变样式。
const TextStyle({
this.inherit = true,// 是否将空值替换为祖先文本中的值样式
this.color, //颜色
this.backgroundColor,
this.fontSize,//大小
this.fontWeight,//字体粗细
this.fontStyle,//文字样式 normal正常 italic 斜体
this.letterSpacing,//每个字母之间要添加的空间量
this.wordSpacing,//在每个序列上要添加的空间量
this.textBaseline,//用于对齐文本的水平线。
this.height,// 此文本跨距的高度,是字体大小的倍数。
this.locale,
this.foreground,//文本颜色 foreground: Paint()..color = Colors.white
this.background,//背景色 background: Paint()..color = Colors.red,
this.shadows, //将在文本下方绘制的[Shadow]列表
this.fontFeatures,//影响字体选择字形方式的[FontFeature]列表。
this.decoration,//要在文本附近绘制的装饰 none无文字装饰,lineThrough删除线,overline文字上面显示
线,underline文字下面显示线
this.decorationColor,//装饰颜色
this.decorationStyle, //样式 double 双线,dashed 断线,dotted点线,solid 实线,wavy波浪线
this.decorationThickness, //作为厚度乘数的装饰笔划的厚度
this.debugLabel,//这种文本样式的人类可读的描述。
String fontFamily,//字体系列
List<String> fontFamilyFallback,//字体系列回退
String package,//
})
网友评论