我试图将一些空间或 SizedBox() 作为 ListView 的最后一项,因为 FloatingActionButton() 隐藏了最后一个 ListTile 中的一些信息。
我想像 WhatsApp 那样滚动到 space/SizeBox() 。
body: ListView.builder(
itemCount: cardsList.length,
itemBuilder: (context, i) {
return Column(
children: [
ListTile( ... ),
Divider( ... ),
],
);
},
),
Run Code Online (Sandbox Code Playgroud)
ListView
具有填充属性
body: ListView.builder(
padding: const EdgeInsets.only(bottom: 100),
itemCount: cardsList.length,
itemBuilder: (context, i) {
return Column(
children: [
ListTile( ... ),
Divider( ... ),
],
);
},
),
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1765 次 |
最近记录: |