[vector_graphic] docs: corrected width/height description in VectorGraphic#11361
[vector_graphic] docs: corrected width/height description in VectorGraphic#11361eflat64 wants to merge 1 commit intoflutter:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the vector_graphics package version to 1.1.21 and refines the documentation for the width and height parameters of the VectorGraphic widget. Feedback suggests further clarifying this documentation to describe behavior in both constrained and unconstrained environments for improved precision.
|
|
||
| /// If specified, the width to use for the vector graphic. If unspecified, | ||
| /// the vector graphic will take the width of its parent. | ||
| /// the vector graphic will take the width of the graphic. |
There was a problem hiding this comment.
This documentation is an improvement for unconstrained scenarios, but it could be more precise about behavior in constrained environments. To avoid ambiguity, it's helpful to mention both cases, similar to how Flutter's Image widget is documented.
| /// the vector graphic will take the width of the graphic. | |
| /// the graphic will be sized to its parent's constraints, or to its | |
| /// intrinsic width if unconstrained. |
|
|
||
| /// If specified, the height to use for the vector graphic. If unspecified, | ||
| /// the vector graphic will take the height of its parent. | ||
| /// the vector graphic will take the height of the graphic. |
There was a problem hiding this comment.
Similar to the width property, this documentation could be more precise by describing the behavior for both constrained and unconstrained environments.
| /// the vector graphic will take the height of the graphic. | |
| /// the graphic will be sized to its parent's constraints, or to its | |
| /// intrinsic height if unconstrained. |
Corrected the documentation for width and height parameters in the VectorGraphic widget.
Fixes flutter/flutter#184116
Pre-Review Checklist
[shared_preferences]///).Test exemption: this is a documentation-only change.
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-assistbot 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.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. ↩ ↩2