selectModes method

  1. @override
List<MatrixApp> selectModes(
  1. List<MatrixApp> modes,
  2. List<MatrixApp> selected,
  3. List<SmfModule> modules
)
override

The apps of modes, the apps with every module of modules for the other values of the mode options of their roles (modeAppsOf), that the selection takes next to selected, the apps that select took, in their order.

Implementation

@override
List<MatrixApp> selectModes(
  List<MatrixApp> modes,
  List<MatrixApp> selected,
  List<SmfModule> modules,
) {
  final strength = this.strength;
  if (strength == null) return modes;
  final apps = [...selected, ...modes];
  final covering = _Covering.of(
    apps,
    modules,
    strength,
    taken: selected.length,
  );
  return [for (final index in covering.indices) apps[index]];
}