Flutter 表格控件(Table)

Flutter 表格控件(Table)Table是一个表格控件,酷客教程的Flutter Table有对Table有做简单介绍,请大家参考。

主要属性如表所示:
Flutter 表格控件(Table)

Table各个属性的用法如下:

Table(
  border: TableBorder.all(),
  columnWidths: <int, FixedColumnWidth>{
0: FixedColumnWidth(50),
1: FixedColumnWidth(80),
  },
  textDirection: TextDirection.rtl,
  defaultVerticalAlignment: TableCellVerticalAlignment.middle,
  children: <TableRow>[
TableRow(children: <Widget>[
  SizedBox(
    height: 50,
    child: Text('Flutter1'),
  ),
  Text('Flutter2'),
  Text('Flutter3'),
]),
TableRow(children: <Widget>[
  Text('Flutter1'),
  Text('Flutter2'),
  Text('Flutter3'),
]),
TableRow(children: <Widget>[
  Text('Flutter1'),
  Text('Flutter2'),
  Text('Flutter3'),
]),
  ],
)

运行效果如图所示:
Flutter 表格控件(Table)

酷客网相关文章:

赞(0)

评论 抢沙发

评论前必须登录!