我想添加帶列的listviw。 . . . . . .. . . .
. . . . . ..
在'a'螢屏,我想顯示串列。
但是我不能,我得到了錯誤。 我不知道為什么。
誰能幫幫我嗎?
這是我的部分代碼:
這是我的部分代碼。
Expanded(
孩子。Padding(
padding: const EdgeInsets.only(top: 30)。
孩子。容器(
width: 500,
孩子。DefaultTabController(
長度。3,
孩子。Scaffold(
appBar: PreferredSize(
首選尺寸。Size.fromHeight(50.0)。
孩子。const TabBar(
tabs: <Widget>[
標簽(
文本。"a",
),
標簽(
文本。"b",
),
Tab(
文本。"c",
),
],
),
),
身體。const TabBarView(
children: <Widget>[
中心(
child: Text("a")。
//這里我想添加listView。
),
中心(
孩子。Text("b")。
),
居中(
孩子。Text("c")。
),
],
),
),
),
),
),
),
uj5u.com熱心網友回復:
只需在TabBarView中洗掉'const'
body: TabBarView(
children: <Widget>[
中心()
孩子。Text("a"/span>)。
),
中心(
孩子。Text("b")。
),
居中(
孩子。Text("c")。
),
],
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/315692.html
標籤:
上一篇:WPFListViewTemplateInvalidCastException:'無法將'System.Windows.Controls.ListView'型別的物件轉換
