Answers for "inkwell ripple effect"

0

inkwell ripple effect

//*Note:- We can't use decoration in animatedContainer to get ripple effect
     and use borderRadius(if required) outside Inkwell as shown...
 *code:-
 
bool changeButton =false;

 Material(
          borderRadius: BorderRadius.all(
           Radius.circular(changeButton ? 50 : 8)),
           child: InkWell(
            onTap: (){},
            child: AnimatedContainer(
            duration: const Duration(seconds: 1),
            width: changeButton ? 50 : 140,
            height: 40,
             alignment: Alignment.center,
             child: Text("Hello"),),),)
Posted by: Guest on February-01-2022

Browse Popular Code Answers by Language