单击 IconButton() 时删除单击效果

cfa*_*tic 8 dart flutter

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

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

每当我单击图标按钮时,都会出现如图屏幕截图所示的飞溅/单击效果。MaterialApp()该小部件在和内运行Scaffold()

我怎样才能停用这种视觉效果?

KKR*_*cks 14

使用此代码:

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

Run Code Online (Sandbox Code Playgroud)