num mouseX

The x-coordinate of the mouse relative to the local coordinate system of the display object.

If you need both mouseX and mouseY, it is more efficient to use the mousePosition getter.

Source

num get mouseX {
  var mp = this.mousePosition;
  return (mp != null) ? mp.x : 0.0;
}