Skip to content

[vector_graphic] docs: corrected width/height description in VectorGraphic#11361

Open
eflat64 wants to merge 1 commit intoflutter:mainfrom
eflat64:eflat64/vectorGraphicDocs
Open

[vector_graphic] docs: corrected width/height description in VectorGraphic#11361
eflat64 wants to merge 1 commit intoflutter:mainfrom
eflat64:eflat64/vectorGraphicDocs

Conversation

@eflat64
Copy link

@eflat64 eflat64 commented Mar 26, 2026

Corrected the documentation for width and height parameters in the VectorGraphic widget.

Fixes flutter/flutter#184116

Pre-Review Checklist

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.

Footnotes

  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. 2

@eflat64 eflat64 requested a review from jtmcdole as a code owner March 26, 2026 10:48
@github-actions github-actions bot added p: vector_graphics triage-engine Should be looked at in engine triage labels Mar 26, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Choose a reason for hiding this comment

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

medium

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.

Suggested change
/// 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.

Choose a reason for hiding this comment

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

medium

Similar to the width property, this documentation could be more precise by describing the behavior for both constrained and unconstrained environments.

Suggested change
/// 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.

@jtmcdole jtmcdole added the CICD Run CI/CD label Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD p: vector_graphics triage-engine Should be looked at in engine triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[vector_graphics] The documentation for height and width parameters is misleading

2 participants