【问题标题】:How to use TableRowInkWell inside Table in flutter?如何在 Flutter 中使用 TableRowInkWell?
【发布时间】:2018-09-15 13:27:52
【问题描述】:

有人用 TableRowInkWell 创建表吗?

我想要一个表格,左侧是可点击的行,右侧是不可点击的行。

有没有创建漂亮表格的示例?

【问题讨论】:

  • 这令人困惑;你的意思是你想要一个两列表,左边是可点击的列,右边是不可点击的列?此外,为此,您最好在第一列的每个元素中都有一个 InkWell....

标签: dart flutter


【解决方案1】:

您只能在TableRowTableCell 中使用TableRowInkWell

例如:

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

【讨论】:

    猜你喜欢
    • 2019-03-16
    • 2019-07-29
    • 2021-12-03
    • 2021-04-15
    • 1970-01-01
    • 2022-07-28
    • 2022-12-25
    • 2023-01-10
    • 2021-09-28
    相关资源
    最近更新 更多