onHover method

Widget onHover(
  1. void action(
    1. bool hovering
    )
)

Adds a handler for hover events.

The action parameter is called with true when hover begins and false when it ends.

Example:

Text("Hover over me").onHover((isHovering) {
  print(isHovering ? "Hovering" : "Not hovering");
})

Implementation

Widget onHover(void Function(bool hovering) action) =>
    OnHover(action: action, child: this);