如何从可点击的透明容器中去除涟漪效应?
How do you remove RIPPLE EFFECT from a CLICKABLE TRANSPARENT CONTAINER?
我想从透明的可点击容器中移除波纹效果,但无论我做什么,效果都不会消失,请帮忙!
代码:
InkWell(
onTap: (){print('Tapped');},
child: Container(
height: 200, width: 200,),)
改用GestureDetector
:
GestureDetector(
onTap: () {print('Tapped');},
child: Container(
height: 200, width: 200,
),
)
在您的 Material App Widget ThemeData 中添加以下行
highlightColor: Colors.transparent,
hoverColor: Colors.transparent,
splashColor: Colors.transparent,
splashFactory: NoSplash.splashFactory,
喜欢
theme: ThemeData(
highlightColor: Colors.transparent,
hoverColor: Colors.transparent,
splashColor: Colors.transparent,
splashFactory: NoSplash.splashFactory,
)
我想从透明的可点击容器中移除波纹效果,但无论我做什么,效果都不会消失,请帮忙!
代码:
InkWell(
onTap: (){print('Tapped');},
child: Container(
height: 200, width: 200,),)
改用GestureDetector
:
GestureDetector(
onTap: () {print('Tapped');},
child: Container(
height: 200, width: 200,
),
)
在您的 Material App Widget ThemeData 中添加以下行
highlightColor: Colors.transparent,
hoverColor: Colors.transparent,
splashColor: Colors.transparent,
splashFactory: NoSplash.splashFactory,
喜欢
theme: ThemeData(
highlightColor: Colors.transparent,
hoverColor: Colors.transparent,
splashColor: Colors.transparent,
splashFactory: NoSplash.splashFactory,
)