hitTestState property Null safety

DisplayObject? hitTestState
read / write

Specifies a display object that is used as the hit testing object for the button.

For a basic button, set the hitTestState property to the same display object as the overState property. If you do not set the hitTestState property, the SimpleButton is inactive — it does not respond to user input events.


DisplayObject? hitTestState;