Skip to content

Conversation

@Gustl22
Copy link
Contributor

@Gustl22 Gustl22 commented Feb 12, 2026

Closes flutter/flutter#158496

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 3

@Gustl22 Gustl22 requested a review from jtmcdole as a code owner February 12, 2026 22:17
@github-actions github-actions bot added p: vector_graphics triage-engine Should be looked at in engine triage labels Feb 12, 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 fixes an issue where BoxFit was not being respected for vector graphics with a viewBox. The change refactors the sizing logic in _VectorGraphicWidgetState to correctly use FittedBox. The PR also renames an internal variable for clarity and adds extensive new tests, including golden file tests, to verify the fix. The changes are logical and well-tested. I've included a few minor suggestions to align with Dart's style guide.

@Gustl22 Gustl22 force-pushed the 158496-vector-boxfit branch from 81bbbe6 to baa096a Compare February 12, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[flutter_svg] Incorrect behavior of BoxFit parameter

1 participant