NodeFilter.where constructor

const NodeFilter.where(
  1. bool predicate(
    1. Object node
    )
)

Includes nodes for which predicate returns true.

The predicate is called with each candidate node every frame, so keep it cheap (a set membership test is ideal).

Implementation

const NodeFilter.where(bool Function(Object node) predicate)
  : _predicate = predicate,
    _layerMask = null;