I want to remove the ripple effect from a transparent clickable container but no matter what I do the effect just doesn't go away, please help!
Code:
InkWell(
onTap: (){print('Tapped');},
child: Container(
height: 200, width: 200,),)
CodePudding user response:
use GestureDetector
instead:
GestureDetector(
onTap: () {print('Tapped');},
child: Container(
height: 200, width: 200,
),
)
CodePudding user response:
Put Following Line in Your Material App Widget ThemeData
highlightColor: Colors.transparent,
hoverColor: Colors.transparent,
splashColor: Colors.transparent,
splashFactory: NoSplash.splashFactory,
Like
theme: ThemeData(
highlightColor: Colors.transparent,
hoverColor: Colors.transparent,
splashColor: Colors.transparent,
splashFactory: NoSplash.splashFactory,
)