我想從透明的可點擊容器中去除漣漪效果,但無論我做什么,效果都不會消失,請幫忙!
代碼:
InkWell(
onTap: (){print('Tapped');},
child: Container(
height: 200, width: 200,),)
uj5u.com熱心網友回復:
改用 GestureDetector:
GestureDetector(
onTap: (){print('Tapped');},
child: Container(
height: 200, width: 200,),)
uj5u.com熱心網友回復:
在您的 Material App 小部件 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,
)
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/315563.html
