Using freezed in a package: do I need to commit my generated files? #1086
-
I am using a flutter app (say Now my app uses
And when I
Which tells me it was not generated properly for the dependency. Am I doing something wrong, or do I just have to commit my generated files? I'm guessing it has something to do with this part in build.yaml in builders:
freezed:
import: "package:freezed/builder.dart"
builder_factories: ["freezed"]
build_extensions: { ".dart": [".freezed.dart"] }
auto_apply: dependents
build_to: source # If this would say cache, would it perhaps work?
runs_before: ["json_serializable|json_serializable"] Any help is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You don't need to. That's up to you. On the other hand, if you want to publish a package, the generated files need to be published too. As such:
|
Beta Was this translation helpful? Give feedback.
You only need to check them in for git dependencies.
For pub dependencies, that's not necessary. But you may have to update your .pubignore
That's not specific to Freezed