[vector_graphics_compiler] Add example for pub.dev Example tab#11314
[vector_graphics_compiler] Add example for pub.dev Example tab#11314sheershtehri7 wants to merge 1 commit intoflutter:mainfrom
Conversation
|
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. |
There was a problem hiding this comment.
Code Review
This pull request adds an example for the vector_graphics_compiler package. It introduces an example.md file and updates the main README.md to point to a new, more comprehensive example. The example application in the vector_graphics package is extended to demonstrate both runtime SVG loading via NetworkSvgLoader and build-time SVG compilation using an asset transformer with AssetBytesLoader. A new SVG asset is added for this purpose, and the pubspec.yaml is updated accordingly. The review includes a suggestion to replace hardcoded spacing values with constants to improve maintainability.
d5f6156 to
b5a8985
Compare
|
This PR adds only documentation ( |
|
Thanks for the contribution!
The CHANGELOG checklist item has two options; doing one of them is required, which is why it's on the checklist. If you believe that this PR falls under the documented exceptions, then you should list the specific documented exception(s) that this falls under and check the item. |
| SizedBox( | ||
| width: 150, | ||
| height: 150, | ||
| child: VectorGraphic( |
There was a problem hiding this comment.
Is there a reason we can't add a widget test to the example that verifies that this widget is loaded and has the correct size, so that we have an automated test that the example is doing what we expect?
There was a problem hiding this comment.
the restructured standalone example app includes test/widget_test.dart which verifies:
The app bar title 'Build-time SVG Transformer' is present
The SizedBox wrapping the VectorGraphic has the correct 200×200 dimensions
Happy to extend the test coverage further if needed.
b5a8985 to
a738026
Compare
This PR falls under the documented exception for "PRs that only affect unpublished parts of example apps" from the Version and CHANGELOG section of the contributing guide. Please let me know your preference and I'll update accordingly. |
The package README isn't part of the example app at all, so cannot fall under an exemption that only applies to the example app. Please see also https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#faq |
Creates a standalone example app in vector_graphics_compiler/example/ demonstrating the build-time SVG asset transformer with AssetBytesLoader. Adds example.md for the pub.dev Example tab. Updates the package README with a link to the new example. Fixes flutter/flutter#183947
a738026 to
02a6d9b
Compare
You're right on both counts, I apologize for the incorrect exception claim. I've added a patch version bump (1.2.0 → 1.2.1) and CHANGELOG entry covering the README update and example app addition. |
Creates a standalone example app in
vector_graphics_compiler/example/demonstrating the build-time SVG asset transformer withAssetBytesLoader. Addsexample/example.mdfor the pub.dev Example tab and updates the package README with a link to the new example.Fixes flutter/flutter#183947
Pre-Review Checklist
[shared_preferences]///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩