Skip to content

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

Merged
auto-submit[bot] merged 1 commit intoflutter:mainfrom
eflat64:eflat64/vectorGraphicDocs
Mar 30, 2026
Merged

[vector_graphic] docs: corrected width/height description in VectorGraphic#11361
auto-submit[bot] merged 1 commit intoflutter:mainfrom
eflat64:eflat64/vectorGraphicDocs

Conversation

@eflat64
Copy link
Copy Markdown
Contributor

@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
Copy Markdown

@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.
Copy link
Copy Markdown

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.
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

lgtm

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 30, 2026
@auto-submit auto-submit bot merged commit 6aec00b into flutter:main Mar 30, 2026
80 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 31, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Mar 31, 2026
flutter/packages@582f0e7...b04f3e5

2026-03-30 jhy03261997@gmail.com [ci] Compares commits before creating a
sync PR to sync release branch back to the main branch.
(flutter/packages#11398)
2026-03-30 jhy03261997@gmail.com [ci] Add permission to
release_from_branches.yml (flutter/packages#11397)
2026-03-30 srawlins@google.com [pigeon] Reduces lint rules ignored in
generated Dart code (flutter/packages#11230)
2026-03-30 stuartmorgan@google.com [google_maps_flutter] Add missing
exports (flutter/packages#11196)
2026-03-30 89637597+eflat64@users.noreply.github.com [vector_graphic]
docs: corrected width/height description in VectorGraphic
(flutter/packages#11361)
2026-03-30 47866232+chunhtai@users.noreply.github.com [ci] Uses
fluttergithubbot to create branches and PRs (flutter/packages#11368)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App 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

4 participants