//String data 显示的文本
//TextStyle style 样式
//TextAlign textAligin 对齐
//TextDirection textDirection;
//Locale locale;
// final bool softWrap; 是否换行
//final TextOverflow overflow; 文本过长后 怎么显示
// final double textScaleFactor; //字体缩放比率
// final int maxLines; 最多显示多少行
// final String semanticsLabel;
const 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);
const Text.rich(this.textSpan, {
Key key,
this.style,
this.textAlign,
this.textDirection,
this.locale,
this.softWrap,
this.overflow,
this.textScaleFactor,
this.maxLines,
this.semanticsLabel,
}): assert(textSpan != null),
data = null,
super(key: key);