美文网首页
Flutter 文本TextStyle相关属性

Flutter 文本TextStyle相关属性

作者: Lost_Robot | 来源:发表于2020-08-20 17:38 被阅读0次
const TextStyle({
    this.inherit: true,         // 为false的时候不显示
    this.color,                    // 颜色 
    this.fontSize,               // 字号
    this.fontWeight,           // 字重,加粗也用这个字段  FontWeight.w700
    this.fontStyle,                // FontStyle.normal  FontStyle.italic斜体
    this.letterSpacing,        // 字符间距  就是单个字母或者汉字之间的间隔,可以是负数
    this.wordSpacing,        // 字间距 句字之间的间距
    this.textBaseline,        // 基线,两个值,字面意思是一个用来排字母的,一人用来排表意字的(类似中文)
    this.height,                // 当用来Text控件上时,行高(会乘以fontSize,所以不以设置过大)
    this.decoration,        // 添加上划线,下划线,删除线 
    this.decorationColor,    // 划线的颜色
    this.decorationStyle,    // 这个style可能控制画实线,虚线,两条线,点, 波浪线等
    this.debugLabel,
    String fontFamily,    // 字体
    String package,
  }) : fontFamily = package == null ? fontFamily : 'packages/$package/$fontFamily',
       assert(inherit != null);

相关文章

网友评论

      本文标题:Flutter 文本TextStyle相关属性

      本文链接:https://www.haomeiwen.com/subject/yjcejktx.html