如何在flutter中使用TableRowInkWell?

时间:2018-04-05 16:25:24

标签: dart flutter

是否有人使用TableRowInkWell创建表?

我想要一张左侧可点击行的表格和右侧无法点击的行。

有没有创建好桌子的例子?

1 个答案:

答案 0 :(得分:0)

您只能在TableRowInkWellTableRow内使用TableCell

例如:

Table(
  border: TableBorder.all(),
  children: [
    TableRow(children: [
    ///Like this one*******
      TableRowInkWell(
          onTap: (){},
        child: Column(children: [
          Icon(
            Icons.account_box,
            size: iconSize,
          ),
          Text('My Account'),
        ]),
      ),
      Column(children: [
        Icon(
          Icons.settings,
          size: iconSize,
        ),
        Text('Settings')
      ]),
    ]),
  ],
)