如何在 flutter 中在 TabBarView 中添加列表

how to Add List in TabBarView in flutter

我想添加 listviw 列。 . . . . . .. . . .

。 . . . . ..

在 'a' 屏幕中我想显示列表。

但我不能,而且出现错误。 我不知道为什么。

有人可以帮我吗?

这是我的代码的一部分:

 Expanded(
            child: Padding(
              padding: const EdgeInsets.only(top: 30),
              child: Container(
                width: 500,
                child: DefaultTabController(
                  length: 3,
                  child: Scaffold(
                    appBar: PreferredSize(
                      preferredSize: Size.fromHeight(50.0),
                      child: const TabBar(
                        tabs: <Widget>[
                          Tab(
                              text: "a",
                          ),
                          Tab(
                            text: "b",
                          ),
                          Tab(
                            text: "c",
                          ),
                        ],
                      ),
                    ),
                    body: const TabBarView(
                      children: <Widget>[
                        Center(
                            child: Text("a "),
//here i want to add listView
                        ),
                        Center(
                          child: Text("b"),
                        ),
                        Center(
                          child: Text("c"),
                        ),
                      ],
                    ),
                  ),
                ),
              ),
            ),
          ),

只需在 TabBarView

中删除 'const'
            body: TabBarView(
              children: <Widget>[
                Center(
                    child: Text("a "),

                ),
                Center(
                  child: Text("b"),
                ),
                Center(
                  child: Text("c"),
                ),
              ],