Selector constructor

Selector(
  1. List<Node> nodes, {
  2. required bool isPartial,
})

Constructs a Selector instance.

  • nodes are the composite children nodes to be evaluated.
  • isPartial indicates whether the Selector instance should evaluate all of its composite children Node instances in one update cycle or sequentially with multiple calls to the update() method.
    1. true: Evaluate one child node per update cycle.
    2. false: Evaluate all children nodes in one update cycle.

Note: Multiple calls to the update() method are required in either case if the currently evaluated child Node returns Status.running.

Implementation

Selector(final List<Node> nodes, {required final bool isPartial})
    : _updateImplementation = isPartial ? Selector._partial : Selector._full,
      super(nodes);