Support `vector_graphics_compiler` integration
What does this change?
Recently, flutter_svg started supports for pre-compiled SVG images.(For more information, please see here.
Since flutter_gen cannot recognize .vec files, which are generated by vector_graphics_compiler, the file paths look like simple Strings.
In this pull request, I'd like to suggest supporting the integration of vector_graphics as well as flutter_svg.
Fixes #362 🎯
Type of change
Please delete options that are not relevant.
- [x] New feature (non-breaking change which adds functionality)
- [x] This change requires a documentation update
Checklist:
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [x] Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests (
melos run unit:test) - [x] Ensure the analyzer and formatter pass (
melos run formatto automatically apply formatting)
- [x] Ensure the tests (
- [x] Appropriate docs were updated (if necessary)
Codecov Report
Merging #364 (e3a645f) into main (ba28410) will increase coverage by
0.05%. The diff coverage is100.00%.
:exclamation: Current head e3a645f differs from pull request most recent head 5822a3b. Consider uploading reports for the commit 5822a3b to get more accurate results
@@ Coverage Diff @@
## main #364 +/- ##
==========================================
+ Coverage 98.28% 98.33% +0.05%
==========================================
Files 20 21 +1
Lines 700 722 +22
==========================================
+ Hits 688 710 +22
Misses 12 12
| Files | Coverage Δ | |
|---|---|---|
| packages/core/lib/generators/assets_generator.dart | 98.13% <100.00%> (-0.02%) |
:arrow_down: |
| ...tors/integrations/vector_graphics_integration.dart | 100.00% <100.00%> (ø) |
|
| packages/core/lib/settings/pubspec.dart | 96.96% <ø> (ø) |
|
| packages/core/lib/settings/pubspec.g.dart | 100.00% <100.00%> (ø) |
I resolved a merge conflict.
@powdream Hi, sorry for the late review (I just boarded the team recently). I was wondering if you could make this implicit support rather than explicit support because it's more look like a sub-feature of flutter_svg. WDYT?
As long as I know, the feature requires a separate dependency "vector_graphics". So, I'm not sure whether it is fine to assume "vector_graphics" would be specified the app's pubspec.yaml file.
As long as I know, the feature requires a separate dependency "vector_graphics". So, I'm not sure whether it is fine to assume "vector_graphics" would be specified the app's pubspec.yaml file.
flutter_svg already depends on vector_graphics_compiler so it shouldn't be a problem to integrate with.
As long as I know, the feature requires a separate dependency "vector_graphics". So, I'm not sure whether it is fine to assume "vector_graphics" would be specified the app's pubspec.yaml file.
flutter_svgalready depends onvector_graphics_compilerso it shouldn't be a problem to integrate with.
@AlexV525 Got it. Thanks for the answer. Let me give it a try.