名称 功能
textAlign
文本对齐方式(center 居中,left 左
对齐,right 右对齐,justfy 两端对齐)
textDirection
文本方向(ltr 从左至右,rtl 从右至
左)
overflow
文字超出屏幕之后的处理方式(clip 裁剪,fade 渐隐,ellipsis 省略号)
maxLines 文件显示最大行数
 textScaleFactor 字体显示倍率
 style 字体的样式设置 

 下面是TextStyle的参数:

名称 功能
decoration 文字装饰线(none 没有线,lineThrough 删除线,overline 上划线,underline 下划线)
decorationColor 文字装饰线颜色
decorationStyle 文字装饰风格([dashed,dotted] 虚线,double 两根线,solid 一根实线,wavy 波浪线)
wordSpacing
单词间隙(如果是负值,会让单词变得更紧凑)
letterSpacing
字母间隙(如果是负值,会让字母变得更紧凑)
fontStyle
文字样式(italic 斜体,normal 正常体)
fontSize
文字大小
color
文字颜色
fontWeight
字体粗细(bold 粗体,normal 正常体)

相关文章:

  • 2021-08-13
  • 2021-05-31
  • 2022-12-23
  • 2021-06-13
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2021-04-12
猜你喜欢
  • 2021-09-04
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案