Home > Mobile >  How do you remove RIPPLE EFFECT from a CLICKABLE TRANSPARENT CONTAINER?
How do you remove RIPPLE EFFECT from a CLICKABLE TRANSPARENT CONTAINER?

Time:10-15

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,
)
  • Related