我目前正在使用以下代码在Flutter中创建IconButton()
:
IconButton(
hoverColor: Colors.transparent,
color: _tweenButton.value,
icon: Icon(Icons.send),
onPressed: () => _isComposing ? _handleSubmitted(_textController.text) : null,
)
[每当我单击图标按钮时,就会出现in this screenshot所示的飞溅/单击效果。此小部件正在MaterialApp()
和Scaffold()
内部运行。
如何停用此视觉效果?
使用此代码:
IconButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
color: _tweenButton.value,
icon: Icon(Icons.send),
onPressed: () => _isComposing ? _handleSubmitted(_textController.text) : null,
)