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

fix: provide theme to SvgAssetLoader instead of SvgPicture #532

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

Kirpal
Copy link
Contributor

@Kirpal Kirpal commented Jun 20, 2024

What does this change?

Since version 5.5.0+1, the SvgTheme no longer works. It doesn't work because flutter_svg has deprecated using the theme with the SvgPicture constructor, and suggests that you pass the theme to the bytes loader instead.

Fixes #531 🎯

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)

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.

Thanks for the update. But the changing files seem not being well-formatted.

examples/example_resources/lib/gen/assets.gen.dart Outdated Show resolved Hide resolved
@Kirpal Kirpal requested a review from AlexV525 June 21, 2024 16:52
Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.27%. Comparing base (dbc01db) to head (b427a82).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #532   +/-   ##
=======================================
  Coverage   97.27%   97.27%           
=======================================
  Files          22       22           
  Lines         772      772           
=======================================
  Hits          751      751           
  Misses         21       21           

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

@AlexV525 AlexV525 merged commit e3d1fcf into FlutterGen:main Jun 22, 2024
5 checks passed
@AlexV525 AlexV525 mentioned this pull request Jun 25, 2024
@wasabeef wasabeef added this to the 5.6.0 milestone Jun 25, 2024
wasabeef added a commit that referenced this pull request Jun 25, 2024
## 5.6.0

**Bug fix**
- [#530](#530) Fix the
Flavored assets. by [@AlexV525](https://github.com/AlexV525)
- Please submit issues later if you have any feedback, this is blocking
users from generating files if they are using flavors or transformations
and there is no workaround for them.
- [#532](#532) Provid the
theme to SvgAssetLoader instead of SvgPicture. by
[@Kirpal](https://github.com/Kirpal)
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]: SvgTheme does not work
3 participants