[flutter_svg] Update README with an example to scale images
Following up on my original PR https://github.com/dnfield/flutter_svg/pull/991 after the suggestion from @darshankawar here.
This is an update to the flutter_svg documentation to include an example of how to scale an SVG image without losing quality, as this is something currently missing from the documentation and causing some confusion.
I believe it resolves the following issues (there might be more since then, the original PR is from 2023, I haven't searched for more):
- https://github.com/dnfield/flutter_svg/issues/858
- https://github.com/yang-f/flutter_svg_provider/issues/47
Pre-Review Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [ ] I read the Tree Hygiene page, which explains my responsibilities.
- [ ] I read and followed the relevant style guides and ran the auto-formatter.
- [x] I signed the CLA.
- [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences] - [x] I linked to at least one issue that this PR fixes in the description above.
- [ ] I updated
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under[^1]. - [ ] I updated
CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under[^1]. - [x] I updated/added any relevant documentation (doc comments with
///). - [ ] I added new tests to check the change I am making, or I have commented below to indicate which test exemption this PR falls under[^1].
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.
If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?
Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.
The Gemini Code Assist review concern is valid, please address
Thank you, I've fixed my examples. My understanding is that these changes are exempt from requiring tests since they affect the docs and examples?
Do I need to make changes to the pubspec.yaml or changelog? I refrained from making changes there to avoid running into unnecessary conflicts for now.