点击IconButton()后移除点击效果

8

我目前正在使用以下代码在Flutter中创建IconButton()

IconButton(
  hoverColor: Colors.transparent,
  color: _tweenButton.value,
  icon: Icon(Icons.send),
  onPressed: () => _isComposing ? _handleSubmitted(_textController.text) : null,
)

无论何时我点击图标按钮时,都会出现水波/点击效果,就像这张截图所示。这个小部件在MaterialApp()Scaffold()中运行。
我该如何关闭这个视觉效果呢?

请查看以下内容:https://dev59.com/S1UM5IYBdhLWcg3wQObw - hewa jalal
1个回答

14

使用此代码:

IconButton(
 splashColor: Colors.transparent,
 highlightColor: Colors.transparent,  
 color: _tweenButton.value,
 icon: Icon(Icons.send),
 onPressed: () => _isComposing ? _handleSubmitted(_textController.text) : null,
)


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接