你好,我想在同一個螢屏上添加另一個串列視圖,我該怎么做?
你好,我想在同一個螢屏上添加另一個串列視圖,我該怎么做?

這是我的代碼:
return Scaffold(
appBar: AppBar(title: Text('detailsPage'),
),
body: ListView(
children: [
Card(
child: ListTile(
title:new Center(child:new Text(utf8.decode(appController.userName.runes.toList()) " " utf8.decode(appController.userSurname.runes.toList()))),
subtitle:new Center(child:new Text('UserID: ' appController.userid.toString())),
)
),
Card(
child: ListTile(
title:new Center(child:new Text(months[index])),
subtitle:new Center(child:new Text("This month you have done " appController.Totaleachlength[index].toString() ' charges')),
),
),
Card(
child: ListTile(
title:new Center(child:new Text(appController.Totaleachlist[index].toStringAsFixed(3) "€")),
subtitle:new Center(child:new Text("Total amount")),
)
),
ElevatedButton(child: Text('Download Bill pdf'),
onPressed: () => ''),
ListTile(
title: new Center(child: new Text('Details of your charges'),),
),
],
shrinkWrap: true,
),
);
uj5u.com熱心網友回復:
如果你想分割你的螢屏,你可以使用Column
return Scaffold(
appBar: AppBar(title: Text('detailsPage'),),
body : Column(
children: [
Expanded(flex: 2 // you can customize as you need
child: ListView()
),
Expanded(flex: 3 // you can customize as you need
child: ListView()
),
])
uj5u.com熱心網友回復:
Column:(
children: [
ListView1(),
ListView2(),
]
),
如果每個串列都沒有滾動,用
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/521289.html
標籤:扑镖
上一篇:如何將變數翻譯成其他語言
