Closed josh-burton closed 1 month ago
As examples are shown in the doc, resolving how transformers handled assets would be overwhelming. To use the asset in different loaders with flutter_gen, simply use its path should be able to compatible with Asset Transformations. In this case, the package will not add additional support for the feature. Feel free to add inputs to my opinion.
Closing as above suggestion. Feel free to leave any further thoughts in the thread.
I think this should be reopened. The proposed solution:
simply use its path should be able to compatible with Asset Transformations
Isn't possible because flutter_gen can't parse the pubspec.yaml when using asset transformations. It gives an error:
There is a problem with "assets". type 'YamlMap' is not a subtype of type 'String' in type cast
This is similar to #494.
This is similar to #494.
So let's track the on that issue, thanks for the reference.
Yes, that error blocking the code generation. Its okay if fluttergen cannot generate that. The package can skip it and I still can call direct path
Is there an existing issue for this?
Describe the problem
Flutter 3.22.0 now supports asset transformation. This allows, for example a .svg to be transformed into a .vec.
https://docs.flutter.dev/ui/assets/asset-transformation
Describe the solution
Support a way to generate asset classes that point to the transformed asset rather than the raw asset
Additional context
No response
Code of Conduct