Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default SvgTheme argument preventing DefaultSvgTheme works correctly #485

Merged
merged 7 commits into from
Mar 18, 2024

Conversation

mym0404
Copy link
Contributor

@mym0404 mym0404 commented Mar 17, 2024

The default SvgTheme argument prevents DefaultSvgTheme provider works correctly. This should be null and works as passthrough behavior

What does this change?

Remove default SvgTheme from svg generator

Fixes #484 🎯

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 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:

  • 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
    • Ensure the tests (melos run test)
    • Ensure the analyzer and formatter pass (melos run format to automatically apply formatting)
  • Appropriate docs were updated (if necessary)

Result

I can confirm that it works after patch this.

  flutter_gen_runner:
    git:
      url: https://github.com/mym0404/flutter_gen.git
      path: packages/runner
      ref: core-patched

The default SvgTheme argument prevents `DefaultSvgTheme` provider works correctly. This should be
null and works as passthrough behavior
@mym0404 mym0404 changed the title feat(svg): remove default SvgTheme argument Remove default SvgTheme argument preventing DefaultSvgTheme works correctly Mar 17, 2024
@AlexV525
Copy link
Member

Thanks for the contribution, could you also add tests indicate that DefaultSvgTheme works?

@mym0404
Copy link
Contributor Author

mym0404 commented Mar 17, 2024

@AlexV525 Do you mean we should add flutter and flutter_test dev dependencies into core package? or should we set up test in example?


I added test at example project.

Copy link

codecov bot commented Mar 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.35%. Comparing base (b45112b) to head (25f921b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #485   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files          21       21           
  Lines         730      730           
=======================================
  Hits          718      718           
  Misses         12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good so far!

examples/example/pubspec.yaml Outdated Show resolved Hide resolved
@mym0404 mym0404 requested a review from AlexV525 March 18, 2024 01:49
@AlexV525 AlexV525 merged commit 063458a into FlutterGen:main Mar 18, 2024
5 checks passed
@wasabeef wasabeef added this to the 5.5.0+1 milestone May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: flutter_svg DefaultSvgTheme not working
3 participants