How to use TableRowInkWell inside Table in flutter?

折月煮酒 提交于 2021-01-27 06:15:08

问题


Does anyone create a table with TableRowInkWell?

I wanted a table with clickable row on the left and unclickable row on the right.

Are there any example for creating a nice table?


回答1:


You can only use TableRowInkWell inside the TableRow or TableCell

for example:

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')
      ]),
    ]),
  ],
)


来源:https://stackoverflow.com/questions/49677189/how-to-use-tablerowinkwell-inside-table-in-flutter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!