GitHub

    Table of contents

  1. Example
  2. Related Links

InkWell

Edit this page

A rectangular area of a Material that responds to touch.

Example

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;
            });
          },
        ),
      ),
    ),
  );
}

Related Links