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