3

Is there a way to pass a variable (like a path to the build.yaml file to then have a builder run only on a single file/directory?

targets:
  $default:
    builders:
      freezed:
        enabled: true
        generate_for:
          include:
            - <my/path.dart>

and my calling command should be something like:

flutter pub run build_runner -flag="my/path.dart"

PS: If I could then apply some ternary check if the flag is null and default to a different directory, that would be amazing :D

1 Answers1

0

i think its by --define as in --help indicates.