Home > Software design >  How to exclude files from compilation in flutter?
How to exclude files from compilation in flutter?

Time:09-16

I have a project that builds several similar apps, different apps require different resources. I have folder assets/images_project1 and images/project2. How can I exclude e.g. images/project2 from the compilation? I don't want to manually replace the folders every time. If files still, they increase the app size

CodePudding user response:

According to this there is no built-in solution as of right now.

But the easiest thing to do is just manually comment folder in pubspec.yaml under the assets section.

Optionally you can use script from the mentioned question.

  • Related