Inkwell widget allows us to implement a very nice wave animation when we press whatever the content is present in the app. One of the features that it provides is the onTap but also the onLongPress, among others. This tool allows you to decorate the widget according to your needs, such as choosing the color (splashColor, focusColor, hoverColor, etc.), it borders, also you can change the wave effect implementing a new background color, etc. This provides the user a more dynamic experience when using your app. However, its shape is not usually customizable as it usually has a rectangle shape

double sideLength = 50;

Widget build(BuildContext context) {
  return Center(
    child: AnimatedContainer(
      height: sideLength,
      width: sideLength,
      duration: Duration(seconds: 2),
      curve: Curves.easeIn,
      child: Material(
        color: Colors.yellow,
        child: InkWell(
          onTap: () {
            setState(() {
              sideLength == 50 ? sideLength = 100 : sideLength = 50;
            });
          },
        ),
      ),
    ),
  );
}

Subscribe For Daily Updates

Flutter Questions
Android Questions