标签:TextStyle Screen 28 flutter width fontSize table 方法 children
/** * 表格 * 表格的每一行的高度,由其内容决定,每一列的宽度,则由columnWidths控制 Table({ Key key, this.children = const <TableRow>[],// this.columnWidths,//设置每一列的宽度。 this.defaultColumnWidth = const FlexColumnWidth(1.0),//默认的每一列宽度值,默认情况下均分 this.textDirection,//文字方向,一般无需考虑。 this.border,//表格边框。 this.defaultVerticalAlignment = TableCellVerticalAlignment.top,//每一个cell的垂直方向的alignment。 top:被放置在的顶部; middle:垂直居中; bottom:放置在底部; baseline:文本baseline对齐; fill:充满整个cell。 this.textBaseline,//defaultVerticalAlignment为baseline的时候,会用到这个属性。 }) */
Table(
columnWidths: <int, TableColumnWidth>{
0: FixedColumnWidth(Screen.width(300)),
1: FixedColumnWidth(Screen.width(300))
},
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
border: TableBorder.all(
color: Colors.grey,
width: Screen.width(2)
),
children: [
TableRow(
decoration: BoxDecoration(
color: ColorGather.colorBg()
),
children: [
Container(
alignment: Alignment.center,
height: Screen.width(80),
child: Text('荣誉等级', style: TextStyle(fontSize: Screen.width(28)),),
),
Text('荣誉等级', style: TextStyle(fontSize: Screen.width(28)), textAlign: TextAlign.center,)
]
),
TableRow(
children: [
Container(
alignment: Alignment.center,
height: Screen.width(80),
child: Text('黄铜', style: TextStyle(fontSize: Screen.width(28)),),
),
Text('荣誉等级', style: TextStyle(fontSize: Screen.width(28)), textAlign: TextAlign.center,)
]
),
],
)
标签:TextStyle,Screen,28,flutter,width,fontSize,table,方法,children 来源: https://www.cnblogs.com/zhaofeis/p/12567148.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。