The node will receive user interactions, such as pointer (touch or mouse) events.
class MyCustomNode extends NodeWithSize {
userInteractionEnabled = true;
}
Source
bool get userInteractionEnabled => _userInteractionEnabled;
Source
set userInteractionEnabled(bool userInteractionEnabled) { _userInteractionEnabled = userInteractionEnabled; if (_spriteBox != null) _spriteBox._eventTargets = null; }