零基础学Flutter之Widget基础组件Text
Text用于显示简单样式文本,它包含一些控制文本显示样式的一些属性
Text组件结构
Text(this.data, {
Key key,
this.style,
this.textAlign,
this.textDirection,
this.locale,
this.softWrap,
this.overflow,
this.textScaleFactor,
this.maxLines,
this.semanticsLabel,
}) : assert(data != null),
textSpan = null,
super(key: key);
Text组件属性详讲
- style:文本的样式属性
TextStyle({ this.inherit = true, this.color, this.fontSize, this.fontWeight, this.fontStyle, this.letterSpacing, this.wordSpacing, this.textBaseline, this.height, this.locale, this.foreground, this.background, this.shadows, this.decoration, this.decorationColor, this.decorationStyle, this.debugLabel, String font