79201858

Date: 2024-11-19 01:41:40
Score: 1.5
Natty:
Report link

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;

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Alexandre B.