getInputsAndIgnoreTransformed function

List<String> getInputsAndIgnoreTransformed(
  1. WidgetRef ref
)

TODO 20240908 zy THIS SHOULD BE IN OWN FILE.

Implementation

List<String> getInputsAndIgnoreTransformed(WidgetRef ref) {
  // The rolesProvider lists the roles for the different variables which we need
  // to know for parsing the R scripts.

  Map<String, Role> roles = ref.read(rolesProvider);

  // Extract the input variable from the rolesProvider.

  List<String> inputs = [];
  roles.forEach((key, value) {
    if (value == Role.input || value == Role.ignoreAfterTransformed) {
      inputs.add(key);
    }
  });

  return inputs;
}