getReceivers method Null safety

  1. @override
List<Logic> getReceivers()
override

Lists all receivers, recursively including all sub-Conditionals receivers.

Implementation

@override
List<Logic> getReceivers() {
  final allReceivers = <Logic>[];
  for (final element in then) {
    allReceivers.addAll(element.getReceivers());
  }
  for (final element in orElse) {
    allReceivers.addAll(element.getReceivers());
  }
  return allReceivers;
}