flutter text

2018-11-16  本文已影响0人  萍水相逢_程序员

//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);
上一篇 下一篇

猜你喜欢

热点阅读