我有一个IconButton
,当按下时波纹效果是圆形的并且比按钮的面积大,我怎样才能减少点击按钮时波纹效果的大小?
IconButton(
constraints: const BoxConstraints(minWidth: 30),
icon: SvgPicture.asset(
'asset_path',
color: Colors.white,
),
onPressed: () {
// do something
},
)
最佳答案
splashRadius: 120,
IconButton(
iconSize: 80,
splashRadius: 120,
splashColor: Colors.green,
tooltip: 'Répète le mot',
icon: Icon(
Icons.mic,
color: Colors.red[900],
),
使用splashRadius来控制
关于Flutter:控制 IconButton 上的波纹效果大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70951493/