xxxxxxxxxx
//*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"),),),)