triggerTriggerables method

Set<Triggerable> triggerTriggerables(
  1. FormInstance mainInstance,
  2. EvaluationContext ec,
  3. TreeReference changedRef, [
  4. Set<Triggerable> affectAllRepeatInstances = const {},
  5. Set<Triggerable> alreadyEvaluated = const {},
])

Re-evaluates what depends on the node at changedRef; returns the evaluated triggerables.

Implementation

Set<Triggerable> triggerTriggerables(
  FormInstance mainInstance,
  EvaluationContext ec,
  TreeReference changedRef, [
  Set<Triggerable> affectAllRepeatInstances = const {},
  Set<Triggerable> alreadyEvaluated = const {},
]) {
  final cascadeRoots = _triggerablesPerTrigger[changedRef.genericize()];
  if (cascadeRoots == null) return alreadyEvaluated;
  return _evaluate(
    mainInstance,
    ec,
    _allToTrigger(cascadeRoots),
    changedRef,
    affectAllRepeatInstances,
    alreadyEvaluated,
  );
}