Do you think that something like it could be work for you?
Center(
child: Material(
color: Colors.transparent,
child: InkWell(
onHover: (val) {
setState(() {
colorHover = val ? Colors.red : Colors.yellow;
});
},
onTap: () {},
child: AnimatedContainer(
color: colorHover,
height: 400,
width: 400,
duration: Duration(milliseconds: 200),
curve: Curves.easeIn,
child: Container(
height: 400,
width: 400,
),
),
),
)),
Need to declare Color colorHover = Colors.yellow;