我正在尝试找出实现与附件类似的东西的最佳方法是什么
目前,我已经像下面那样完成了,我想知道是否有使用按钮等的更清洁或更佳的方法。
class GetFilters extends StatelessWidget {
GetFilters();
@override
Widget build(BuildContext context) {
return ListView(
// This next line does the trick.
scrollDirection: Axis.horizontal,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(Icons.call),
Text('Afterpay'),
],
)
]
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(Icons.call),
Text('Afterpay'),
],
)
]
)
]
);
}
}