New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flavors? #54
Comments
It might not be a breaking change, just adding a "flavors" node with all the flavors icons configuration might do the trick. |
I'm not sure I understand where you're coming from. I did a bit of research and I've found it's possible to have a debug icon and a release icon for Android: https://stackoverflow.com/questions/22875948/how-to-provide-different-android-app-icons-for-different-gradle-buildtypes/22876224#22876224 Are you wanting something like that? Where you can specify a debug flavor? Or are you just wanting an option to quickly switch between different flavors of launcher icons? If you do, this is already possible, you could have your image_path and android / ios icon names all specified for the different flavours and then just comment out the ones which you don't want to use. It'll quickly switch between them for you. |
Yes I wanted something like option 1, so that running |
Unfortunately unless Flutter cmd line tools support that, you wont be able to run I'll also need to look into how passing cmd line arguments will work as I haven't done that before. Curious how you would prefer this to be setup within the pubspec.yaml config? |
The flutter CLI supports it. It's just a pass through to gradle flavours and to iOS schemas. I guess a good idea might be, while taking as base the readme example:
by making the flavors node optional older configurations should be compatible with this feature. |
This would be a killer feature... @MarkOSullivan94 were you be able look into this at all? |
See my pull request. A sample project is available at following repository: |
Flavor support is working in the flavor branch for projects which already have flavors setup. I'm hoping to add a separate example app which makes use of flavors before merging that branch into master. |
Related: #130 Will leave this to someone else who has experience with setting up a Flutter project with flavours enabled |
I will add a project with flavors set today ;) If so, do you think we could get this merge soon? |
I have created #154 to showcase this functionality. Can someone review the PR? 👀 @MarkOSullivan94 @slightfoot |
Flavors functionality available for now in the flavors branch thanks to @sestegra for the implementation and @jorgecoca for putting together the example project 🎉 There's currently some merge conflicts preventing it from being merged into master branch right now. |
@jorgecoca @sestegra For a bit of clarification, is the intended functionality of this feature to automatically rebuild the app launcher icons every time the app is built? Or do we still need to manually run this command each time we switch from one flavor to another? |
Ok I take back my question. I had not set everything up correctly so it wasn't working as expected! Once I got everything in the right folders and with the correct names, I was able to run |
The sample doesn't work in such way. The command |
Can anyone summarize where this issue stands? Has the functionality been abandoned? Is it blocked on a technical hurdle? |
I am using it on two projects and everything is fine. |
If I get it right, we're supposed to use the branch flavors? Is there any chance that gets merged? Its already a bit behind. |
I'm trying to figure this out but the examples/flavor just contains 3 config .yaml files. What is supposed to be run to generate the flavored assets? |
@matthew-carroll @lifenautjoe it currently works in the flavors branch and I've also spent time trying to fix the merge conflicts between the Just want to do some more testing before merging @lifenautjoe in the example flavors project you can run any of the following commands which will work:
For every single flavor you have within your project, you should have a yaml config file for it, in the example project there's 3 flavors:
|
FWIW, just running this is enough to handle all flavors: In case you are wondering why it won't work for you, you may have used an underscore instead of a dash before your flavor name. So |
It would be nice to have the possibility to use this package also to manage various flavors icons, I guess this might be a breaking change to simply replicate this configuration API.
Another option would be making a new package, some type of flavors helper which uses this package to handle the icon parts.
The text was updated successfully, but these errors were encountered: