Closed madroidmaq closed 4 years ago
Hey @madroidmaq
I think your configuration is wrong!
The assets inside directories 2.0x
and 3.0x
is used by Flutter internally. It has nothing to do with assets path and developers don't need to reference them anywhere in their dart code. So you can omit those directories from your configuration file. You just have to mention the root directory of those assets directories like this:
groups:
- path: assets/images
class_name: Images
package: res
This will work perfectly in your case.
@madroidmaq However, we can show some kind of warning or error when the user tries to use those directories in the configuration file. I have created one issue with an enhancement label that describes this in detail. Follow this #13
@madroidmaq The default implementation says spider to generate a reference for any file in the directory unless you provide allowed types in the configuration file.
However, it is not aware of OS files like this .DS_STORE
file on mac systems. But it should. I have created a new issue addressing this. #14
@madroidmaq Until it is fixed, what you can do is that
.ds_store
file.groups:
- path: assets/images
class_name: Images
package: res
types: [ .png, .jpg, .jpeg, .webp, .png, .gif ]
I am closing this issue and you can follow these issues addressing main issues that you've reported and enhancements. #13 #14
Hey @madroidmaq
I think your configuration is wrong! The assets inside directories
2.0x
and3.0x
is used by Flutter internally. It has nothing to do with assets path and developers don't need to reference them anywhere in their dart code. So you can omit those directories from your configuration file. You just have to mention the root directory of those assets directories like this:groups: - path: assets/images class_name: Images package: res
This will work perfectly in your case.
@BirjuVachhani I mention the root directory of those assets directories as you say. But it will not generate image resources in the 2.0x and 3.0x directory。
What should I do to generate resources under the 2.0x and 3.0x directory?Looking forward to your reply.
I am coming again :)
In multi-resolution scenes, Like below:
Only a 1.0x path should be generated, like
but I have something wrong. Here is some of our environmental information:
spider.ymal
auto gen code
terminal log
Is the configuration information in our file wrong, or am I missing something?
by the way, I think
.DS_Store
files should not be generated.