Flutter ListViewの高さを定義する方法
- 2023年2月17日
- 技術情報
ListViewのアイテムの高さを定義するには、itemExtentを引数として使用します。
ListView(
itemExtent: //,
children : []
);
使用法例
return Scaffold(
body: ListView(
itemExtent: 150,
children: [
Card(
color: Colors.blue,
child: ListTile(
title: Text('Item1'),
),
),
Card(
color: Colors.blue,
child: ListTile(
title: Text('Item2'),
),
),
Card(
color: Colors.blue,
child: ListTile(
title: Text('Item3'),
),
),
],
),
);

金曜担当 – Ami
asahi at 2023年02月17日 10:00:00