addSystems method

AppBuilder addSystems(
  1. ScheduleLabel schedule,
  2. List<SystemDescriptor> descriptors, {
  3. RunCondition? runIf,
  4. SystemSet? inSet,
  5. bool chained = false,
})

Registers descriptors in schedule.

chained runs them in list order.

Implementation

AppBuilder addSystems(
  ScheduleLabel schedule,
  List<SystemDescriptor> descriptors, {
  RunCondition? runIf,
  SystemSet? inSet,
  bool chained = false,
}) {
  for (var i = 0; i < descriptors.length; i++) {
    addSystem(
      descriptors[i],
      schedule: schedule,
      after: chained && i > 0
          ? <SystemDescriptor>[descriptors[i - 1]]
          : const <SystemDescriptor>[],
      runIf: runIf,
      inSet: inSet,
    );
  }
  return this;
}