spider icon indicating copy to clipboard operation
spider copied to clipboard

Fix/Package related asset paths are legit now

Open Aqluse opened this issue 2 years ago • 4 comments

Description of the Change

Fulfills issue given https://github.com/BirjuVachhani/spider/issues/64 more precisely that kind of paths https://docs.flutter.dev/development/ui/assets-and-images#bundling-of-package-assets

Alternate Designs

No alternatives considered.

Why Should This Be In Core?

As this kind of asset paths are legit in Dart ecosystem.

Benefits

Ability to use the generator with package assets.

Possible Drawbacks

No imminent drawbacks are expected.

Verification Process

  • How did you verify that all new functionality works as expected?
  • How did you verify that all changed functionality works as expected?

I have run the generator for package and direct asset paths both. Output paths are whole being generated as expected.

  • How did you verify that the change has not introduced any regressions?

Just verified it by running generator for direct asset paths might be impacted by following changes. No other checks have been executed.

Applicable Issues

https://github.com/BirjuVachhani/spider/issues/64

Aqluse avatar Aug 11 '22 18:08 Aqluse

@Aqluse Thank you for the PR! This looks good. I'll test it out later. Can you please add some tests for this?

BirjuVachhani avatar Aug 12 '22 05:08 BirjuVachhani

Codecov Report

Merging #65 (446a5d4) into main (dd61a57) will increase coverage by 0.07%. The diff coverage is 81.81%.

@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   57.75%   57.82%   +0.07%     
==========================================
  Files          31       31              
  Lines         722      728       +6     
==========================================
+ Hits          417      421       +4     
- Misses        305      307       +2     
Impacted Files Coverage Δ
lib/src/cli/utils/constants.dart 50.00% <ø> (ø)
lib/src/dart_class_generator.dart 81.28% <75.00%> (-0.69%) :arrow_down:
lib/src/cli/utils/helpers.dart 95.00% <100.00%> (+0.17%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Aug 12 '22 05:08 codecov-commenter

@BirjuVachhani Unfortunately I am quite busy in nearest future.

Aqluse avatar Aug 16 '22 20:08 Aqluse

@Aqluse Can you provide me information about how to use it? I wanna test it with this asset package: https://pub.dev/packages/country_icons

BirjuVachhani avatar Aug 20 '22 15:08 BirjuVachhani

@Aqluse Seems like build is failing because of code formatting.

BirjuVachhani avatar Nov 03 '22 04:11 BirjuVachhani

Available in v4.1.0

BirjuVachhani avatar Nov 16 '22 12:11 BirjuVachhani