使用dart在颤振中创建表视图

时间:2018-06-11 09:45:49

标签: dart flutter flutter-layout

我试图在颤动中创建tableview,但是找不到任何我能理解的例子。有人可以提供一个简单的例子。

2 个答案:

答案 0 :(得分:1)

https://api.flutter.dev/flutter/widgets/Table-class.html上存在指令和语法

 Container(
    color: Colors.white,
    padding: EdgeInsets.all(20.0),
    child: Table(
      border: TableBorder.all(color: Colors.black),
      children: [
        TableRow(children: [
          Text('Cell 1'),
          Text('Cell 2'),
          Text('Cell 3'),
        ]),
        TableRow(children: [
          Text('Cell 4'),
          Text('Cell 5'),
          Text('Cell 6'),
        ])
      ],
    ),
  )

答案 1 :(得分:0)

只需使用Table

我放弃了在我的App中使用表格。

但是我在github上通过Google为您找到了一个示例:https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/demo/material/data_table_demo.dart

相关问题