[英]I want two list view with same area in single screen, how can I set it up?
@override
Widget build(BuildContext context) {
new Scaffold(
appBar: new AppBar(title: new Text("Demo Project")),
body: new Padding(
padding: new EdgeInsets.all(10.0),
child: new Column(
children: <Widget>[
new ListView(children: getDemolist()),
new ListView(children: getDemolisttwo())
],
),
),
);
}
所有兩個列表視圖將以響應方式顯示在同一區域。
使用Flexible並且您可以更改其中的flex 屬性,就像Expanded一樣。
Column(
children: <Widget>[
Flexible(child: getDemolist()),
Flexible(child: getDemolisttwo()),
],
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.