flutter_gen icon indicating copy to clipboard operation
flutter_gen copied to clipboard

Support `vector_graphics_compiler` integration

Open powdream opened this issue 2 years ago • 6 comments

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 format to automatically apply formatting)
  • [x] Appropriate docs were updated (if necessary)

powdream avatar Mar 06 '23 05:03 powdream

Codecov Report

Merging #364 (e3a645f) into main (ba28410) will increase coverage by 0.05%. The diff coverage is 100.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%> (ø)

... and 9 files with indirect coverage changes

codecov[bot] avatar Mar 08 '23 13:03 codecov[bot]

I resolved a merge conflict.

powdream avatar Apr 19 '23 11:04 powdream

@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?

AlexV525 avatar Nov 04 '23 14:11 AlexV525

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.

powdream avatar Nov 05 '23 03:11 powdream

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.

AlexV525 avatar Nov 05 '23 12:11 AlexV525

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.

@AlexV525 Got it. Thanks for the answer. Let me give it a try.

powdream avatar Nov 11 '23 06:11 powdream